Macro to automatically move down 1 cell,run macro


Posted by Upjon on February 07, 2001 11:17 AM

Please help with a macro that after starting a print job, will automatically move down one cell and start its macro to print another job.
Is this possible? I am new to macros, so be as specific as possible if this is do-able.
Thanks in advance.
Jon

Posted by Dave Hawley on February 07, 2001 9:10 PM


Hi Jon


Sounds like you need what is known as a Loop. Below is example of one that will select each cell in the range A1:A10 and run the macro "MyPrint" each time it selects a cell. Remove the Application.Screenupdating=False if you are wanting the print preview or alike to show.

Sub TryThis()
Dim Cell As Range
Application.Screenupdating=False
For Each Cell In Range("A1:A10")
Cell.Select
Run "MyPrint"
Next
Application.Screenupdating=False
End Sub


Sub MyPrint()
'<Your print code>
End Sub

Hope this helps


Dave

OzGrid Business Applications



Posted by Upjon on February 08, 2001 6:05 AM

Dave - Thanks for the help, it works great!
Jon