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