Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Bottom of spreadsheet hidden by taskbar in full screen view
If you change Excel to Full Screen View and your taskbar is always on top (as
it normally is), the bottom of the spreadsheet is hidden behind the taskbar. Does anyone know how to get around this without hiding the taskbar? I have found that if I drag the taskbar to the bottom and then back up again, the Excel window resizes itself correctly and the bottom of the spreadsheet is visible again. Problem is, I want to do this from VBA! Can anyone help please??? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Bottom of spreadsheet hidden by taskbar in full screen view
Hi
Here is the code snippet which will reset the taskbar. You may have a try. Commonly this is a Shell issue, for detailed information you may also try the newsgroup below. microsoft.public.platformsdk.shell Private Declare Function SHAppBarMessage Lib "shell32.dll" _ (ByVal dwMessage As Long, _ ByRef pData As APPBARDATA) _ As Long Private Const ABS_AUTOHIDE As Long = &H1 Private Const ABM_GETTASKBARPOS As Long = &H5 Private Const ABM_GETSTATE As Long = &H4 Private Const ABM_SETSTATE As Long = &HA Private Const ABM_SETAUTOHIDEBAR As Long = &H8 Private Type RECT Left As Long Top As Long Right As Long Bottom As Long End Type Private Type APPBARDATA cbSize As Long hwnd As Long uCallbackMessage As Long uEdge As Long rc As RECT lParam As Long ' message specific End Type Private Function IsTaskbar_AutoHideEnabled() As Boolean Dim abd As APPBARDATA Dim Result As Long IsTaskbar_AutoHideEnabled = False Call SHAppBarMessage(ABM_GETTASKBARPOS, abd) Result = SHAppBarMessage(ABM_GETSTATE, abd) If (Result And ABS_AUTOHIDE) Then Result = CBool(SHAppBarMessage(ABM_SETAUTOHIDEBAR, abd)) IsTaskbar_AutoHideEnabled = Result End If End Function Sub Test() Dim abd As APPBARDATA Dim Result As Long ' Call SHAppBarMessage(ABM_GETTASKBARPOS, abd) Result = SHAppBarMessage(ABM_GETSTATE, abd) ' Call SHAppBarMessage(ABM_SETAUTOHIDEBAR, abd) Application.DisplayFullScreen = False 'If IsTaskbar_AutoHideEnabled = False Then abd.lParam = Result Or ABS_AUTOHIDE Call SHAppBarMessage(ABM_SETSTATE, abd) 'Else abd.lParam = Result And Not ABS_AUTOHIDE Call SHAppBarMessage(ABM_SETSTATE, abd) 'End If Application.DisplayFullScreen = True End Sub Sub Macro1() End Sub Best regards, Peter Huang Microsoft Online Partner Support Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
view excel in full screen view | Excel Worksheet Functions | |||
Full Screen View | Excel Discussion (Misc queries) | |||
Bottom of spreadsheet hidden in full screen view | Excel Discussion (Misc queries) | |||
Why can I only view my spreadsheet in full screen | Excel Discussion (Misc queries) | |||
open with full screen view | Excel Programming |