How do I strip (remove) the caption of a custom CommandBar in EXCEL ?

I know how to do that for userforms as well as other windows via setting the window Styles but can't make it work for commandbars.

Here is what I have so far but it doesn't work !

"Test" is the Caption of the EXCEL Custom Toolbar which is on display when the Code runs.



Code in a Bas Module:

VB Code:
  1. Declare Function FindWindow Lib "USER32" Alias "FindWindowA" _
  2. (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
  3.  
  4.  
  5. Private Declare Function GetWindowLong Lib "USER32" _
  6. Alias "GetWindowLongA" (ByVal hWnd As Long, _
  7. ByVal nIndex As Long) As Long
  8.  
  9.  
  10. Private Declare Function SetWindowLong Lib "USER32" _
  11. Alias "SetWindowLongA" (ByVal hWnd As Long, _
  12. ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
  13.  
  14. Private Declare Function DrawMenuBar Lib "USER32" _
  15. (ByVal hWnd As Long) As Long
  16.  
  17. Private Const GWL_STYLE As Long = (-16)
  18. Private Const WS_CAPTION As Long = &HC00000
  19.  
  20. Dim lngCBHwnd As Long
  21. Dim IStyle
  22.  
  23.  
  24. Sub Test()
  25.  
  26.     lngCBHwnd = FindWindow("MsoCommandBar", "Test")
  27.    
  28.     Debug.Print lngCBHwnd
  29.    
  30.     IStyle = GetWindowLong(lngCBHwnd, GWL_STYLE)
  31.    
  32.     IStyle = IStyle And Not WS_CAPTION
  33.    
  34.     SetWindowLong lngCBHwnd, GWL_STYLE, IStyle
  35.    
  36.     DrawMenuBar lngCBHwnd
  37.  
  38. End Sub
Is there a special Style for these type of MSO CommandBars class ? ? Or maybe a SendMessage Function is needed with a special Msg ??


This is driving me mad and any help would be much appreciated .