![]() |
Need Code To Print From Code Modules
I have been struggling with coming up with a code to print the contents from other (general) code modules. Suppose I have Sub test1() Sub test2() Sub test3() in 3 separate modules, Module1,Module2, modulue3 I want my code Sub PrintCodes() in another module (preferably, in personal.xls file) to loop through all the 3 codes and reel off prints. This is my effort thus far (not working!): Sub PrintCodes() For i = 1 to 3 set x = ThisWorkBook.VbProject.CodeModule(i).("test" & i) x.print i = i+1 next End Sub TIA -- davidm ------------------------------------------------------------------------ davidm's Profile: http://www.excelforum.com/member.php...o&userid=20645 View this thread: http://www.excelforum.com/showthread...hreadid=376986 |
All times are GMT +1. The time now is 01:31 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com