View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Macro for hiding and printing.

Don't put it under ThisWorkbook.

Select your project and Insert|Module

Paste the code in that new window.

Then either run the code (tools|macro|macros) or assign it to a button from the
Forms toolbar.



Olle Svensson wrote:

"Dave Peterson" wrote:

What happened when you tried it? How did you try it? Since it worked ok for
me.


Like I wrote in the above post:
Maybe I am doing it wrong, but I go to Microsoft Visual Basic, from Excel,
paste it
under Microsoft Excel Objects -- ThisWorkbook, save and exit to Excel. Then
I press the print button but nothing happens. Well, the print comes out but
with the undesired columns still visible.

I'm not sure if I need a command for it to be used with all sheets when I
print but if possible, that's what I want.


--

Dave Peterson