Display sheet upon exit

  • Thread starter Thread starter JAMES SYLVESTERSR
  • Start date Start date
J

JAMES SYLVESTERSR

Is there a way in VBA to cause a worksheet to display when exiting the
workbook.
 
Is there a way in VBA to cause a worksheet to display
when exiting the workbook.

Yes, put code like this in the ThisWorkbook module.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets("fill_name").Activate
End Sub


HTH,
Merjet
 
James,

It could be done with the Workbook_Deactivate event , but ..
Wouldn't this mean that you could never switch to another workbook, as by
making a worksheet in that workbook visible, you re-enter it?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top