Creating a print button using VB

JonKeane

New Member
Joined
Jul 27, 2005
Messages
29
Hi all. I have been given a small task which will require me to use VB code within an excel workbook.

I have been given a workbook that contains say 10 sheets. The first sheet is a summary sheet that will contain a 'Print' button. The idea is that when the Print button is selected all the sheets that's have been filled out will be printed.

For example.

I have a workbook that has 10 sheets to fill out. The user has filled out 7 out of the 10 sheets and when selecting the Print button, I require only the 7 completed sheets to print.

I thought the best way to go about this was to look at 1 particular cell on each sheet. If the cell is blank, do not print the sheet, otherwise do so.

I'm no VB coder by a long shot, although with a little help I can normally manage to make this kind of thing.

Any help this this would be most appreciated.

Thanks is advance for any help with this.

Jon Keane
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
use this formula in your sheet wherever you need your file name.

=MID(CELL("filename",A1),SEARCH("[",CELL("filename",A1))+1,SEARCH(".",CELL("filename",A1))-1-SEARCH("[",CELL("filename",A1)))
 
Upvote 0
WinteE, sorry to say that I started this chat and still I haven't got my answer. please give me that code which prints 1st 100 summaries of 800 from the drop-down list and I want to create 8 buttons please answer me soon for this.
please WinteE this is urgent
 
Upvote 0
WinteE, sorry to say that I started this chat and still I haven't got my answer. please give me that code which prints 1st 100 summaries of 800 from the drop-down list and I want to create 8 buttons please answer me soon for this.
please WinteE this is urgent

Turn on the macrorecorder (Tools, Macro, Record macro) and start printing the sheets you want to. Insert a button and connect the recorded macro to it.
 
Upvote 0
Vba print button

I have a file which consists a sheet having 800+ rows data and in a summary sheet, I want 8 print buttons to print 100 summaries for each button.

001 – 100 for button A
101 – 200 for button B
201 – 300 for button C
301 – 400 for button D
401 – 500 for button E
501 – 600 for button F
601 – 700 for button H
701 – 800 for button H

Like in this way I want to create button please help me.
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

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