LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 173
Default Auto Hide Task Bar

Hi Bearacade,
It worked a treat. Sorry it took so long getting back to you, I have been away
Many thanks
Regards
John

"Bearacade" wrote:


I am having a brain fart, I could for the LIFE of me figure out what
task bar was.. haha.. ok.. here goes.. put all of this in ThisWorkbook


Private Declare Function ShowWindow Lib "user32" _
(ByVal hwnd As Long, ByVal nCmdShow As Long) As Long

Private Declare Function FindWindow Lib "user32" _
Alias "FindWindowA" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long

Private Declare Function FindWindowEx Lib "user32" _
Alias "FindWindowExA" (ByVal hWnd1 As Long, _
ByVal hWnd2 As Long, _
ByVal lpsz1 As String, _
ByVal lpsz2 As String) As Long

Sub TaskBar(blnValue As Boolean)
Dim lngHandle As Long
Dim lngStartButton As Long

lngHandle = FindWindow("Shell_TrayWnd", "")

If blnValue Then
ShowWindow lngHandle, 5
Else
ShowWindow lngHandle, 0
End If
End Sub

Private Sub Cmdhide()
Dim A As Boolean
A = False
TaskBar (A)
End Sub

Private Sub Cmdunhide()
Dim A As Boolean
A = True
TaskBar (A)
End Sub

Private Sub Workbook_Open()

Call Cmdhide

End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)

Call Cmdunhide

End Sub


--
Bearacade


------------------------------------------------------------------------
Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016
View this thread: http://www.excelforum.com/showthread...hreadid=550033




 
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
auto hide Chad Excel Discussion (Misc queries) 9 February 19th 09 07:34 PM
Auto Hide Columns when... Jase4now Excel Discussion (Misc queries) 0 March 28th 07 07:02 PM
dialog box for active cell task to speed repeditive task Todd F.[_2_] Excel Programming 3 August 9th 05 02:30 PM
Is it possible to hide the Windows Task Bar? quartz[_2_] Excel Programming 2 January 5th 05 01:19 PM
Auto Hide Davo[_3_] Excel Programming 6 February 9th 04 08:56 AM


All times are GMT +1. The time now is 11:34 AM.

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"