View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Status & Formula Bar Disabling Prevention Among Other Opened Workb

You need to go to thisworkbook and place code in the necessary worbook events
to capture when you are looking at the current workbook. Something like
this...

Private Sub Workbook_Activate()
Application.DisplayStatusBar = False
Application.DisplayFormulaBar = False
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.DisplayStatusBar = True
Application.DisplayFormulaBar = True
End Sub

Private Sub Workbook_Deactivate()
Application.DisplayStatusBar = True
Application.DisplayFormulaBar = True
End Sub

Private Sub Workbook_Open()
Application.DisplayStatusBar = False
Application.DisplayFormulaBar = False
End Sub

--
HTH...

Jim Thomlinson


"Edd" wrote:

HI,

I want to disable the Status and Formula bars for a workbook when it is
opened but only for this one specific workbook and not for any other opened
workbooks. I use the below two lines of code.

Application.DisplayStatusBar = False
Application.DisplayFormulaBar = False

How can I prevent these actions from occuring with other opened workbooks?

Thanks,