View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones[_2_] Norman Jones[_2_] is offline
external usenet poster
 
Posts: 421
Default Can I access the "Windows in Taskbar" checkbox within a macro?

Hi Rick,

Possibly use the Before_Close event of a
workbook that will always be open -
possibly your Personal macro workbook,
to restore the setting.

'===========
Option Explicit

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.ShowWindowsInTaskbar = False
End Sub
'<<===========

This is workbook event code and should be
pasted into the workbook's ThisWorkbook
module *not* a standard module or a sheet
module:

Right-click the Excel icon on the worksheet
(or the icon to the left of the File menu if your
workbook is maximised)
Select 'View Code' from the menu and paste
the code.

Alt-F11 to return to Excel.


---
Regards.
Norman