LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need Code To Print From Code Modules


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete Code Modules Programatically blatham Excel Discussion (Misc queries) 1 February 3rd 06 05:38 PM
Problem with Userform and different code modules Jos Vens[_2_] Excel Programming 1 February 23rd 05 09:00 PM
VBA Code to Import VBA Modules Jeff Excel Programming 1 February 2nd 05 07:10 PM
When to code in sheet or userform modules and when to use modules Tony James Excel Programming 1 December 16th 04 10:02 PM
editing code in modules through VB mark Excel Programming 2 August 12th 04 05:20 PM


All times are GMT +1. The time now is 01:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"