LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Help with BeforePrint

I have a slight problem I am hoping the guru's can help me
with.

Currently, I have a sheet that has a button that
calculates a few cells when pressed. I would like the
button to be Visible = False but after it has been
printed, bring the button back. The code I have is:

Private Sub Workbook_BeforePrint(Cancel As Boolean)

If Sheets(13) Is ActiveSheet Then
Sheets(13).Shapes("CommandButton1").Visible = False
Else: End If

End Sub

I can't bring the button back into the above procedure,
becuase when it hits End Sub, but button will be visible
and end up on the hard copy. Any ideas how I can bring the
button back to Visible = True AFTER the above has ran?
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Print preview error from BeforePrint macro LauriS Excel Discussion (Misc queries) 1 December 6th 07 12:06 AM
BeforePrint macro Steve O Excel Discussion (Misc queries) 4 September 21st 05 01:09 AM


All times are GMT +1. The time now is 01:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"