I have the following script to remove captions, can someone please help with a script to show captions.
I have tried the following codes by themseleves and together but nothing happens.
code to remove captions follows
I have tried the following codes by themseleves and together but nothing happens.
Code:
Application.CommandBars("Worksheet Menu Bar").Enabled = True
Application.CommandBars("Worksheet Menu Bar").Visible = True
Application.CommandBars("Worksheet Menu Bar").Reset
Application.Caption = ""
Application.Caption = "List"
code to remove captions follows
Code:
'Returns the Window Handle of the Window
'that is accepting User input.
Public Declare Function GetForegroundWindow _
Lib "User32.dll" () As Long
Private Declare Function GetWindowLong _
Lib "User32.dll" _
Alias "GetWindowLongA" _
(ByVal hWnd As Long, _
ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong _
Lib "User32.dll" _
Alias "SetWindowLongA" _
(ByVal hWnd As Long, _
ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
'Redraw the Icons on the Window's Title Bar
Private Declare Function DrawMenuBar _
Lib "User32.dll" _
(ByVal hWnd As Long) As Long
Private Const GWL_STYLE As Long = (-16)
Private Const WS_CAPTION = &HC00000
Sub RemoveCaption()
Dim BitMask As Long
Dim hWnd As Long
Dim WindowStyle As Long
hWnd = GetForegroundWindow
WindowStyle = GetWindowLong(hWnd, GWL_STYLE)
BitMask = WindowStyle And (Not WS_CAPTION)
Call SetWindowLong(hWnd, GWL_STYLE, BitMask)
Call DrawMenuBar(hWnd)
End Sub