Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing from a validation list 2

Status
Not open for further replies.

Wray69

Technical User
Oct 1, 2002
299
US
I have a form that has a validation list, when I change the value in the validation list it changes many other values on the form. Currently I am having to go through and print these one by one. How would I go about printing these automatically?

Thanks,

Wray
 
Wray69
Can you provide some more info on your validation list. Is it produced in Excel or Word?
Regards
David
 
Sorry about that, it is in Excel. The validation list is in cell B8 and has a list of names. When you change the name it pulls the data for that individuals name. I need to print a sheet for each person in the list.

Thanks,

Wray
 
where is the validation list picking up the names from ??

all you need to do is loop through that list and enter each name in turn into the validation cell

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Taking the names from another tab, I made it a defined range called Names. Can you give me a little direction on how to do a loop through?

Thanks,

Wray
 
Code:
For Each c in [Names]
'process here
Next

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
thanks Geoff,

I tried this

Sub Print_All()
For Each c In [Names]
'process here
Next
End Sub

Realizing there has to be more then this. Can you help me out or point me towards a good VBA reference?

Thanks,

Wray
 
This thread seems to be similair to what I am attempting thread707-877084 but I have a named range called "names" the validation list is in cell B8, how can I adapt the code in this thread to work for me?

Thanks,

Wray
 
Something like this ?
For Each c In Range("names")
[B8] = c.Value
MsgBox "Now B8=" & [B8]
Next

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Well that cycles throught the validation list but it is not printing the sheet as it does it and I have to click OK after each change. How can I print at each change and not have to click OK at each change?
 
Have a look at the PrintOut method of the Worksheet object.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I got it!!!!

Code:
Sub Print_all()
ActiveSheet.PrintOut
For Each c In Range("names")
  [B8] = c.Value
ActiveSheet.PrintOut
Next
End Sub

Thanks for everyones help....

Cheers,

Wray
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top