Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Other program disabling my custom toolbar

Does anyone have any ideas on how to fix this? I've added my custom toolbar
as part of the custom toolbar group on the add in button. I've added it as a
seperate group on the add-in button. I've also tried creating a seperate
ribbon, but it still disables it? Any ideas?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default Other program disabling my custom toolbar

Hi
You need to add it each time Excel opens. You do that by putting the
code which adds the toolbar in the WorkBook_Open macro event
(doubleclick on ThisWorkBook in the VBE and get the event from the
dropdowns).
regards
Paul

On Jun 27, 2:41*pm, vbaexperimenter
wrote:
Does anyone have any ideas on how to fix this? I've added my custom toolbar
as part of the custom toolbar group on the add in button. I've added it as a
seperate group on the add-in button. I've also tried creating a seperate
ribbon, but it still disables it? *Any ideas?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Other program disabling my custom toolbar

Paul,
I'm a complete novice at this. 1) I'm assuming ThisWorkBook you are
refering too is the one under my file name 2) What are the dropdowns you are
refering too? The properties? They are greyed out. 3) Instead of putting my
code in a module, put them in the This workbook? If I do that, then it errors
out on the 2nd line of my code (Invalid inside procedure). Or do I put some
other code w/in the Private Sub Workbook_Open
End Sub

This is my code to create the toolbar as part of the add-ins custom toolbar
group minus my macros. I copied it and the macros with in the Private Sub
Workbook_Open:

Option Explicit
Public Const ToolBarName As String = "HLBTR" <---- this is were it errors
Sub Auto_Open()
Call CreateMenubar
End Sub
Sub Auto_Close()
Call RemoveMenubar
End Sub
Sub RemoveMenubar()
On Error Resume Next
Application.CommandBars(ToolBarName).Delete
On Error GoTo 0
End Sub
Sub CreateMenubar()

Dim iCtr As Long

Dim MacNames As Variant
Dim CapNames As Variant
Dim TipText As Variant
Dim PictNames As Variant
Dim PictWks As Worksheet

Call RemoveMenubar

MacNames = Array("GL", _
"TB", _
"IM", _
"PermFile", _
"PriorYear", _
"PBC", _
"WorkPaper", _
"Recalculated", _
"Fullfoot", _
"Crossfoot", _
"Footed", _
"Source", _
"ZeroSlash", _
"XMark", _
"Checkmark", _
"Undefined")

CapNames = Array("GL", _
"TB", _
"IM", _
"PermFile", _
"PriorYear", _
"PBC", _
"WorkPaper", _
"Recalculated", _
"Fullfoot", _
"Crossfoot", _
"Footed", _
"Source", _
"ZeroSlash", _
"XMark", _
"Checkmark", _
"Undefined")

TipText = Array("Traced to general ledger", _
"Traced to trial balance", _
"Immaterial", _
"Permanent File", _
"Prior Year", _
"Provided by client", _
"Work Paper Reference", _
"Recalculated", _
"Spreadsheet Footed", _
"Cross Footed", _
"Footed", _
"Traced to source document", _
"Zero Slash", _
"X Mark", _
"Check Mark", _
"Undefined")

PictNames = Array("GL", _
"TB", _
"IM", _
"PermFile", _
"PriorYear", _
"PBC", _
"WorkPaper", _
"Recalculated", _
"Fullfoot", _
"Crossfoot", _
"Footed", _
"Source", _
"ZeroSlash", _
"XMark", _
"Checkmark", _
"Undefined")

Set PictWks = ThisWorkbook.Worksheets("Pictures")

With Application.CommandBars.Add
..Name = "HLBTR"
..Left = 200
..Top = 200
..Protection = msoBarNoProtection
..Visible = True
..Position = msoBarFloating

For iCtr = LBound(MacNames) To UBound(MacNames)
PictWks.Pictures(PictNames(iCtr)).Copy
With .Controls.Add(Type:=msoControlButton)
..OnAction = "'" & ThisWorkbook.Name & "'!" & MacNames(iCtr)
..Caption = CapNames(iCtr)
..Style = msoButtonIcon
..PasteFace
..TooltipText = TipText(iCtr)
End With
Next iCtr

End With
End Sub

" wrote:

Hi
You need to add it each time Excel opens. You do that by putting the
code which adds the toolbar in the WorkBook_Open macro event
(doubleclick on ThisWorkBook in the VBE and get the event from the
dropdowns).
regards
Paul

On Jun 27, 2:41 pm, vbaexperimenter
wrote:
Does anyone have any ideas on how to fix this? I've added my custom toolbar
as part of the custom toolbar group on the add in button. I've added it as a
seperate group on the add-in button. I've also tried creating a seperate
ribbon, but it still disables it? Any ideas?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Other program disabling my custom toolbar

Scratch my last post I got that figured out, but what you suggested didn't
help. The other program still disables my toolbar. Any other ideas?


" wrote:

Hi
You need to add it each time Excel opens. You do that by putting the
code which adds the toolbar in the WorkBook_Open macro event
(doubleclick on ThisWorkBook in the VBE and get the event from the
dropdowns).
regards
Paul

On Jun 27, 2:41 pm, vbaexperimenter
wrote:
Does anyone have any ideas on how to fix this? I've added my custom toolbar
as part of the custom toolbar group on the add in button. I've added it as a
seperate group on the add-in button. I've also tried creating a seperate
ribbon, but it still disables it? Any ideas?



Reply
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
Disabling Toolbar Francis Ang[_3_] Excel Programming 4 October 10th 06 12:08 AM
custom toolbar buttons are saved where? Excel loads twice bymistake and all my custom toolbar buttons get gone!!! Kevin Waite Excel Programming 2 March 3rd 04 03:31 PM
Disabling Print on TOOLBAR Dan Gesshel Excel Programming 5 October 23rd 03 10:12 PM
How disabling sounds when calling a shell program? Michel[_3_] Excel Programming 4 October 22nd 03 09:38 AM
Disabling toolbar customization kb Excel Programming 0 July 29th 03 08:33 PM


All times are GMT +1. The time now is 03:32 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"