Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default Do Until Loop Question, for Printing

Good afternoon all,

I have a list of names on a worksheet named Lists. On the Main
worksheet, I have a drop down field that references the range of names
(called Names).

If anyone can please help me with the code to automatically:
1. In the drop down, select the first name (B1)
(This generates a report on the Main worksheet in A2:J20)
2. Print the Main worksheet
3. Select the next name
4. Print the Main worksheet
...repeat until there are no more names (i.e. blank cell in column A on the
Lists Worksheet)

Thank you, and have a great weekend!
Renee
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Do Until Loop Question, for Printing

You said the range is named Lists, then I think you said it is named Names.
C11 below represents where the dropdown places the selection. Change to
suit.

Sub ABC()
Dim cell as Range
for each cell in Range("Lists")
Worksheets("Sheet1").Range("C11").Value = cell.Value
worksheets("Main").Range("A2:J20").Printout
Next
End Sub

--
Regards,
Tom Ogilvy





"Renee" wrote:

Good afternoon all,

I have a list of names on a worksheet named Lists. On the Main
worksheet, I have a drop down field that references the range of names
(called Names).

If anyone can please help me with the code to automatically:
1. In the drop down, select the first name (B1)
(This generates a report on the Main worksheet in A2:J20)
2. Print the Main worksheet
3. Select the next name
4. Print the Main worksheet
..repeat until there are no more names (i.e. blank cell in column A on the
Lists Worksheet)

Thank you, and have a great weekend!
Renee

Reply
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
Loop question aelewis Excel Discussion (Misc queries) 2 October 24th 07 08:12 PM
Loop question N.F[_2_] Excel Discussion (Misc queries) 0 July 12th 07 08:02 PM
Loop printing George Hill Excel Programming 2 March 28th 06 05:26 AM
loop question dabith Excel Programming 6 June 13th 04 05:28 PM
One more loop question Patti[_5_] Excel Programming 11 June 6th 04 07:14 AM


All times are GMT +1. The time now is 05:20 PM.

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"