I am sure this is pretty simple, but I am unsure how to do this. I would like to create a button to print out certain cells, most of which are hidden. How do I go about doing this?
Right click on the Sheet Tab and select View Code
Select "This Workbook" in the LH window
Paste the code in the RH window, Press ALT + F11 to go back to the Workbook
If you have created a button on the worksheet, Right click on it and select Assign Macro
Select the macro from the list and then OK
The next time you click the button the macro will run
So I got a button and assigned it a macro, but after printing some of my columns get hidden. (depending on what is selected in line 5) The worksheet will be locked and the users will be unable to hide or unhide pages, and in any case I don't want those columns to be hidden as they are visible to start with. The stuff that I will be printing will be in hidden rows. In order to print to they have to be unhidden? Or can they automatically unhide, print and then rehide?
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.