Multiple prints

lapta301

Well-known Member
Joined
Nov 12, 2004
Messages
1,001
Office Version
  1. 365
Platform
  1. Windows
I have a Data Validation list in C3 which at present has the acceptable values of 0, 16 & 24 although these could change.

What I would like is a macro that would go through and select each of the acceptable values and then print the page.

Each value changes the calculations on the page.

As ever your help is most appreciated.
 
Don't worry, it happens to all of us. This is what excel is, a cell, a sheet, a book, there is always something we are wrong about.
Good day and thanks for commenting.
 
Upvote 0

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Just a follow up to say that this little bit of code may not seem much to others but my word it works perfectly and only now do I realise how much time I have spent in the past changing the variables in the drop down and as a result how much time this has saved.
My grateful thanks.
 
Upvote 0
Hi DanteAmor
Apologies for coming back but a minor issue has cropped up that is not terrible but would be nice to correct if possible.
Would it be possible to note the value before the code runs and then return to that value after the printing has completed.
So if the values available are 36 24 12 0 and at the time the code runs 24 is the selected value after printing the 4 sheets 0 becomes the select value rather than 24 as it was when it started.
I hope this makes sense and as ever any help would be helpful.
 
Upvote 0
Try this

VBA Code:
Sub MultiplePrints()
  Dim c As Variant, b As Variant
  
  With Range("C3")
    b = .Value
    For Each c In Split(.Validation.Formula1, ",")
      .Value = c
      ActiveSheet.PrintOut
    Next
    .Value = b
  End With
End Sub
 
Upvote 0
Thank you so much I’ll give it a try tomorrow and report back.

As ever my sincere thanks
 
Upvote 0
Hi again
This is such a good bit of code that I have a desire to use it elsewhere, but instead of some text in C3 I have a date and at present it doesn’t work breaking down at For each C ...

Many thanks
 
Upvote 0
in C3 I have a date

I have a Data Validation list in C3 which at present has the acceptable values of 0, 16 & 24 although these could change.

Give the example of how you have the dates.
 
Upvote 0

Forum statistics

Threads
1,213,552
Messages
6,114,278
Members
448,560
Latest member
Torchwood72

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top