Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Status & Formula Bar Disabling Prevention Among Other Opened Workb

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,
  #2   Report Post  
Posted to microsoft.public.excel.programming
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,

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Status & Formula Bar Disabling Prevention Among Other Opened W

Jim,

With you help, I got it to work.....thank you for your insight!

Ed.


"Jim Thomlinson" wrote:

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,

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Status & Formula Bar Disabling Prevention Among Other Opened W

Jim,

How can I prevent the activate event from firing when I go a different
worksheet within the same workbook? I only want it to fire for one of the
worksheets and not the rest. I tried something like the below to fire when
only sheet1 is in focus, but it does not work. Can you please help? Thanks!

Private Sub WorkbookActivate()
If Sheet1.Visible Then
Application.DisplayStatusBar = False
Application.DisplayFormulaBar = False
End If
End Sub

(Note: I also tried the windowactivate, sheetactivate, and they seem to
operate identically, and they do not work).



"Jim Thomlinson" wrote:

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,

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Status & Formula Bar Disabling Prevention Among Other Opened W

There is a worksheet event (not a workbook level event) that can be used. It
goes in under the worksheet that you want (rightclick on that worksheet's tab
and select view code.)

It'll fire when you go from any other sheet in this same workbook to this sheet.

Option Explicit
Private Sub Worksheet_Activate()
msgbox "hi from: " & me.name
End Sub

It won't fire when you change from one workbook to this workbook.


Edd wrote:

Jim,

How can I prevent the activate event from firing when I go a different
worksheet within the same workbook? I only want it to fire for one of the
worksheets and not the rest. I tried something like the below to fire when
only sheet1 is in focus, but it does not work. Can you please help? Thanks!

Private Sub WorkbookActivate()
If Sheet1.Visible Then
Application.DisplayStatusBar = False
Application.DisplayFormulaBar = False
End If
End Sub

(Note: I also tried the windowactivate, sheetactivate, and they seem to
operate identically, and they do not work).

"Jim Thomlinson" wrote:

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,


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Status & Formula Bar Disabling Prevention Among Other Opened W

Dave,

"It goes in under the worksheet," now why did I not think of that??? Well,
I'm glad I have you guys to think for me. That worked as I intended. Thanks
so much!!

Ed.



"Dave Peterson" wrote:

There is a worksheet event (not a workbook level event) that can be used. It
goes in under the worksheet that you want (rightclick on that worksheet's tab
and select view code.)

It'll fire when you go from any other sheet in this same workbook to this sheet.

Option Explicit
Private Sub Worksheet_Activate()
msgbox "hi from: " & me.name
End Sub

It won't fire when you change from one workbook to this workbook.


Edd wrote:

Jim,

How can I prevent the activate event from firing when I go a different
worksheet within the same workbook? I only want it to fire for one of the
worksheets and not the rest. I tried something like the below to fire when
only sheet1 is in focus, but it does not work. Can you please help? Thanks!

Private Sub WorkbookActivate()
If Sheet1.Visible Then
Application.DisplayStatusBar = False
Application.DisplayFormulaBar = False
End If
End Sub

(Note: I also tried the windowactivate, sheetactivate, and they seem to
operate identically, and they do not work).

"Jim Thomlinson" wrote:

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,


--

Dave Peterson

Reply
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
reuest formula for auto update status & status date PERANISH Excel Worksheet Functions 5 June 2nd 08 04:26 PM
Prevention of Printing Deejay Excel Discussion (Misc queries) 1 September 25th 07 12:20 PM
Closing Form and prevention C_Ascheman[_2_] Excel Programming 3 February 23rd 07 04:51 PM
Excel Question Prevention Help?[_2_] Excel Programming 2 October 30th 06 07:47 PM
write a formula to sum cells on different pages of the same workb. Kestle Excel Worksheet Functions 1 November 8th 04 07:53 PM


All times are GMT +1. The time now is 02:33 PM.

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"