View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Michel Pierron[_2_] Michel Pierron[_2_] is offline
external usenet poster
 
Posts: 63
Default hide TASKBAR in Sub Workbook_open()

Hi Dago;
Private Declare Function FindWindowEx& Lib "user32" Alias "FindWindowExA" _
(ByVal hWnd1&, ByVal hWnd2&, ByVal lpsz1$, ByVal lpsz2$)
Private Declare Function ShowWindow& Lib "user32" (ByVal hwnd&, ByVal nCmdShow&)

Sub TaskBar_Hide()
ShowWindow FindWindowEx(0, 0, "Shell_TrayWnd", vbNullString), 0
End Sub

Sub TaskBar_Show()
ShowWindow FindWindowEx(0, 0, "Shell_TrayWnd", vbNullString), 5
End Sub

MP

"Dago " a écrit dans le message de
...
Hi,

I have an Excel application that hides all bars

With ActiveWindow
DisplayHeadings = False
DisplayOutline = False
DisplayHorizontalScrollBar = False
DisplayVerticalScrollBar = False
DisplayWorkbookTabs = False
End With

but: I want the Windows TASKbar hidden as well to get a real full
screen view.
I want it to work in Windows 98, 2000 and XP and with Excel 97, and
2000

The code should be in the Sub Workbook_open() in the ThisWorkBook
VBAProject in Excel

I've tried several pieces of code, which produce errors.

Is there a piece of code that I can use to hide the Windows taskbar
automatically upon opening the excel file?

This code would be appreciated! If you're willing to help, please
provide some instructions, as I am a relative novice...

Thanks in advance!

Dago


---
Message posted from http://www.ExcelForum.com/