PC Review


Reply
Thread Tools Rate Thread

DisplayFullScreen=False not working

 
 
VBA_Newbie79
Guest
Posts: n/a
 
      31st Jan 2008
Hello all,
I replied to the post about Application.DisplayFullScreen=False not working,
but probably should have started a new one. The original post was located at
http://www.microsoft.com/communities...074&sloc=en-us.

I am having the same trouble as this original post. I have tried the
suggestions by
JLGWhiz and Gord included in the post, but it doesn't seem to be working.
Does anyone know why DisplayFullScreen will not turn off, programmatically?

This only appears to be a problem when my macro is the only spreadsheet
open. The macro will switch in and out of Full Screen fine when another
spreadsheet is open, but not if it is the only spreadsheet open. Stepping
through the code shows that DisplayFullScreen is the only property that will
not change its value. Below is an excerpt from my BeforeClose code.

With Application
.ScreenUpdating = False
.CommandBars("Worksheet Menu Bar").Enabled = True
.CommandBars("Toolbar List").Enabled = True
If .DisplayFullScreen Then
.DisplayFullScreen = False
End If
.ScreenUpdating = True
End With

Any help you can provide would be appreciated. Thank you.
 
Reply With Quote
 
 
 
 
Peter T
Guest
Posts: n/a
 
      31st Jan 2008
At a glance your code looks fine. Try stepping through the code comparing
the 'debugged' application settings with what you see. You don't need to
disable ScreenUpdating, at least not for the snippet you posted; ensure it
is not disabled, at least until you have everything working OK.

Regards,
Peter T

"VBA_Newbie79" <(E-Mail Removed)> wrote in message
news:9D8E935F-CD79-49C6-B100-(E-Mail Removed)...
> Hello all,
> I replied to the post about Application.DisplayFullScreen=False not
> working,
> but probably should have started a new one. The original post was located
> at
> http://www.microsoft.com/communities...074&sloc=en-us.
>
> I am having the same trouble as this original post. I have tried the
> suggestions by
> JLGWhiz and Gord included in the post, but it doesn't seem to be working.
> Does anyone know why DisplayFullScreen will not turn off,
> programmatically?
>
> This only appears to be a problem when my macro is the only spreadsheet
> open. The macro will switch in and out of Full Screen fine when another
> spreadsheet is open, but not if it is the only spreadsheet open. Stepping
> through the code shows that DisplayFullScreen is the only property that
> will
> not change its value. Below is an excerpt from my BeforeClose code.
>
> With Application
> .ScreenUpdating = False
> .CommandBars("Worksheet Menu Bar").Enabled = True
> .CommandBars("Toolbar List").Enabled = True
> If .DisplayFullScreen Then
> .DisplayFullScreen = False
> End If
> .ScreenUpdating = True
> End With
>
> Any help you can provide would be appreciated. Thank you.


 
Reply With Quote
 
JLGWhiz
Guest
Posts: n/a
 
      31st Jan 2008
You also don't need this If statement.

If .DisplayFullScreen Then
> .DisplayFullScreen = False
> End If


Just use: .DisplayFullScreen = False

If it is True it will change to False, and if it is already false, it
will ignore the command.

"VBA_Newbie79" wrote:

> Hello all,
> I replied to the post about Application.DisplayFullScreen=False not working,
> but probably should have started a new one. The original post was located at
> http://www.microsoft.com/communities...074&sloc=en-us.
>
> I am having the same trouble as this original post. I have tried the
> suggestions by
> JLGWhiz and Gord included in the post, but it doesn't seem to be working.
> Does anyone know why DisplayFullScreen will not turn off, programmatically?
>
> This only appears to be a problem when my macro is the only spreadsheet
> open. The macro will switch in and out of Full Screen fine when another
> spreadsheet is open, but not if it is the only spreadsheet open. Stepping
> through the code shows that DisplayFullScreen is the only property that will
> not change its value. Below is an excerpt from my BeforeClose code.
>
> With Application
> .ScreenUpdating = False
> .CommandBars("Worksheet Menu Bar").Enabled = True
> .CommandBars("Toolbar List").Enabled = True
> If .DisplayFullScreen Then
> .DisplayFullScreen = False
> End If
> .ScreenUpdating = True
> End With
>
> Any help you can provide would be appreciated. Thank you.

 
Reply With Quote
 
VBA_Newbie79
Guest
Posts: n/a
 
      31st Jan 2008
JLGWhiz,
I tried the If statement your referring to, because just having
..DisplayFullScreen = False wasn't working. Thanks for the tip.

"JLGWhiz" wrote:

> You also don't need this If statement.
>
> If .DisplayFullScreen Then
> > .DisplayFullScreen = False
> > End If

>
> Just use: .DisplayFullScreen = False
>
> If it is True it will change to False, and if it is already false, it
> will ignore the command.
>
> "VBA_Newbie79" wrote:
>
> > Hello all,
> > I replied to the post about Application.DisplayFullScreen=False not working,
> > but probably should have started a new one. The original post was located at
> > http://www.microsoft.com/communities...074&sloc=en-us.
> >
> > I am having the same trouble as this original post. I have tried the
> > suggestions by
> > JLGWhiz and Gord included in the post, but it doesn't seem to be working.
> > Does anyone know why DisplayFullScreen will not turn off, programmatically?
> >
> > This only appears to be a problem when my macro is the only spreadsheet
> > open. The macro will switch in and out of Full Screen fine when another
> > spreadsheet is open, but not if it is the only spreadsheet open. Stepping
> > through the code shows that DisplayFullScreen is the only property that will
> > not change its value. Below is an excerpt from my BeforeClose code.
> >
> > With Application
> > .ScreenUpdating = False
> > .CommandBars("Worksheet Menu Bar").Enabled = True
> > .CommandBars("Toolbar List").Enabled = True
> > If .DisplayFullScreen Then
> > .DisplayFullScreen = False
> > End If
> > .ScreenUpdating = True
> > End With
> >
> > Any help you can provide would be appreciated. Thank you.

 
Reply With Quote
 
VBA_Newbie79
Guest
Posts: n/a
 
      31st Jan 2008
Peter T,
I've removed the ScreenUpdating code so that I can watch the lines execute.
I assume the 'debugged' application settings your referring to are small
screen tips that appear with the current value of the property, right?

If this is the case, each line that does work, such as
.CommandBars("Worksheet Menu Bar").Enabled = True
.CommandBars("Toolbar List").Enabled = True
show the value False before execting the line, then switch to True after the
lines execute. Unfortunately the problem line
.DisplayFullScreen = False
shows the value True both before and after executing the line. I seem to
have the same trouble with .DisplayHeadings and .DisplayFormulaBar.

Perhaps my computer is haunted...

Thanks for sticking in there with me.

"Peter T" wrote:

> At a glance your code looks fine. Try stepping through the code comparing
> the 'debugged' application settings with what you see. You don't need to
> disable ScreenUpdating, at least not for the snippet you posted; ensure it
> is not disabled, at least until you have everything working OK.
>
> Regards,
> Peter T
>
> "VBA_Newbie79" <(E-Mail Removed)> wrote in message
> news:9D8E935F-CD79-49C6-B100-(E-Mail Removed)...
> > Hello all,
> > I replied to the post about Application.DisplayFullScreen=False not
> > working,
> > but probably should have started a new one. The original post was located
> > at
> > http://www.microsoft.com/communities...074&sloc=en-us.
> >
> > I am having the same trouble as this original post. I have tried the
> > suggestions by
> > JLGWhiz and Gord included in the post, but it doesn't seem to be working.
> > Does anyone know why DisplayFullScreen will not turn off,
> > programmatically?
> >
> > This only appears to be a problem when my macro is the only spreadsheet
> > open. The macro will switch in and out of Full Screen fine when another
> > spreadsheet is open, but not if it is the only spreadsheet open. Stepping
> > through the code shows that DisplayFullScreen is the only property that
> > will
> > not change its value. Below is an excerpt from my BeforeClose code.
> >
> > With Application
> > .ScreenUpdating = False
> > .CommandBars("Worksheet Menu Bar").Enabled = True
> > .CommandBars("Toolbar List").Enabled = True
> > If .DisplayFullScreen Then
> > .DisplayFullScreen = False
> > End If
> > .ScreenUpdating = True
> > End With
> >
> > Any help you can provide would be appreciated. Thank you.

>
>

 
Reply With Quote
 
Peter T
Guest
Posts: n/a
 
      31st Jan 2008
> I assume the 'debugged' application settings your referring to are small
> screen tips that appear with the current value of the property, right?


I wrote 'debugged' to mean whatever method of returning the application
properties serves you best. If you can see the Intellisence - I assume
that's what you mean by "small screen tips" - that's fine. Otherwise write
the properties to a variable, eg

b = .DisplayFullScreen
msgbox b
or
Debug.? b
the ? will change to Print, press ctrl-g to see the Immediate window

Another way - paste following in the Immediate window
? .DisplayFullScreen

when you get to a suitable point, say after "With Application", place the
curser after the DisplayFullScreen and hit enter, then repeat after changing
the property (again put cusor to end of line before hitting enter).

----------

To your main question,
> .DisplayFullScreen = False
> shows the value True both before and after executing the line.


hmm, seems odd. Some application settings can only be changed if an
ActiveSheet is visible, but that's not the issue here.

Make a new test workbook with absolute minimum code to recreate the problem.
If you can recreate the problem describe exactly what you have done, the
entire scenario together with all code (ie the stripped down test wb code)

Regards,
Peter T


"VBA_Newbie79" <(E-Mail Removed)> wrote in message
news:AAFF05BB-9E4B-48B0-B6BD-(E-Mail Removed)...
> Peter T,
> I've removed the ScreenUpdating code so that I can watch the lines

execute.
> I assume the 'debugged' application settings your referring to are small
> screen tips that appear with the current value of the property, right?
>
> If this is the case, each line that does work, such as
> .CommandBars("Worksheet Menu Bar").Enabled = True
> .CommandBars("Toolbar List").Enabled = True
> show the value False before execting the line, then switch to True after

the
> lines execute. Unfortunately the problem line
> .DisplayFullScreen = False
> shows the value True both before and after executing the line. I seem to
> have the same trouble with .DisplayHeadings and .DisplayFormulaBar.
>
> Perhaps my computer is haunted...
>
> Thanks for sticking in there with me.
>
> "Peter T" wrote:
>
> > At a glance your code looks fine. Try stepping through the code

comparing
> > the 'debugged' application settings with what you see. You don't need to
> > disable ScreenUpdating, at least not for the snippet you posted; ensure

it
> > is not disabled, at least until you have everything working OK.
> >
> > Regards,
> > Peter T
> >
> > "VBA_Newbie79" <(E-Mail Removed)> wrote in message
> > news:9D8E935F-CD79-49C6-B100-(E-Mail Removed)...
> > > Hello all,
> > > I replied to the post about Application.DisplayFullScreen=False not
> > > working,
> > > but probably should have started a new one. The original post was

located
> > > at
> > >

http://www.microsoft.com/communities...074&sloc=en-us.
> > >
> > > I am having the same trouble as this original post. I have tried the
> > > suggestions by
> > > JLGWhiz and Gord included in the post, but it doesn't seem to be

working.
> > > Does anyone know why DisplayFullScreen will not turn off,
> > > programmatically?
> > >
> > > This only appears to be a problem when my macro is the only

spreadsheet
> > > open. The macro will switch in and out of Full Screen fine when

another
> > > spreadsheet is open, but not if it is the only spreadsheet open.

Stepping
> > > through the code shows that DisplayFullScreen is the only property

that
> > > will
> > > not change its value. Below is an excerpt from my BeforeClose code.
> > >
> > > With Application
> > > .ScreenUpdating = False
> > > .CommandBars("Worksheet Menu Bar").Enabled = True
> > > .CommandBars("Toolbar List").Enabled = True
> > > If .DisplayFullScreen Then
> > > .DisplayFullScreen = False
> > > End If
> > > .ScreenUpdating = True
> > > End With
> > >
> > > Any help you can provide would be appreciated. Thank you.

> >
> >



 
Reply With Quote
 
JLGWhiz
Guest
Posts: n/a
 
      1st Feb 2008
I went back and read your original tag on to Giffer's post. You say you
cannot get the menu bars to reappear. My menu bar does not go away with the
FullScreen = True. I am using XL2003 on XP SP2. I have tried several
things to replicate your problem, but everything returns to normal on my
system when the commands execute. If your code was in a change event, I
could understand it resetting itself on each iteration, but I don't see how
it can happen with the WB_ Open event. Unless, maybe, and this is a stretch,
you have the open code structured so that it calls a procedure to run and do
things and the WB_Open procedure does not complete until all the other
procedures have processed. I have a couple of workbooks set up like that but
the only code in the open event is the call to the main procedure.
Everything executes and completes by the main procedure but the open event
procedure does not close until everthing else has run. So, if you execute
the FullScreen in the open event AND call a main procedure, that might be
leaving the procedure open and could be why it keeps the FullScreen up.
However, as I said, this is a stretch of the imagination and it still should
momentarily change if switched to False. So, I'll stop rambling now.

"VBA_Newbie79" wrote:

> JLGWhiz,
> I tried the If statement your referring to, because just having
> .DisplayFullScreen = False wasn't working. Thanks for the tip.
>
> "JLGWhiz" wrote:
>
> > You also don't need this If statement.
> >
> > If .DisplayFullScreen Then
> > > .DisplayFullScreen = False
> > > End If

> >
> > Just use: .DisplayFullScreen = False
> >
> > If it is True it will change to False, and if it is already false, it
> > will ignore the command.
> >
> > "VBA_Newbie79" wrote:
> >
> > > Hello all,
> > > I replied to the post about Application.DisplayFullScreen=False not working,
> > > but probably should have started a new one. The original post was located at
> > > http://www.microsoft.com/communities...074&sloc=en-us.
> > >
> > > I am having the same trouble as this original post. I have tried the
> > > suggestions by
> > > JLGWhiz and Gord included in the post, but it doesn't seem to be working.
> > > Does anyone know why DisplayFullScreen will not turn off, programmatically?
> > >
> > > This only appears to be a problem when my macro is the only spreadsheet
> > > open. The macro will switch in and out of Full Screen fine when another
> > > spreadsheet is open, but not if it is the only spreadsheet open. Stepping
> > > through the code shows that DisplayFullScreen is the only property that will
> > > not change its value. Below is an excerpt from my BeforeClose code.
> > >
> > > With Application
> > > .ScreenUpdating = False
> > > .CommandBars("Worksheet Menu Bar").Enabled = True
> > > .CommandBars("Toolbar List").Enabled = True
> > > If .DisplayFullScreen Then
> > > .DisplayFullScreen = False
> > > End If
> > > .ScreenUpdating = True
> > > End With
> > >
> > > Any help you can provide would be appreciated. Thank you.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA always creates linked chart even when using PasteExcelTable False, False, False in Office 2007 Matt Simpson Microsoft Excel Programming 0 6th Aug 2007 08:11 PM
RE: ScreenUpdating = False not working =?Utf-8?B?SmltIFRob21saW5zb24=?= Microsoft Excel Programming 2 14th Dec 2006 02:45 AM
displayfullscreen = false not working job Microsoft Excel Programming 4 28th Jan 2005 12:07 AM
DisplayStatusBar when DisplayFullScreen = TRUE mikeang Microsoft Excel Programming 0 31st Dec 2003 05:05 PM
Excel VBA (DisplayFullscreen and the Windows Toolbar). jim c. Microsoft Excel Programming 1 7th Sep 2003 01:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:18 AM.