Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Minor correction: initializing loop counter to 1 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() i =1 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=376987 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Delete Code Modules Programatically | Excel Discussion (Misc queries) | |||
Problem with Userform and different code modules | Excel Programming | |||
VBA Code to Import VBA Modules | Excel Programming | |||
When to code in sheet or userform modules and when to use modules | Excel Programming | |||
editing code in modules through VB | Excel Programming |