ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Linking custom toolbar to personal.xls (https://www.excelbanter.com/excel-programming/393513-linking-custom-toolbar-personal-xls.html)

Giggly4g

Linking custom toolbar to personal.xls
 
Hi! I've created a custom toolbar (using Dave Peterson's code) and saved it
as an add-in. I set up several macros that were assigned to the toolbar.
Everything was working just fine until I took the macros from a "regular"
file and put them into my personal.xls. Now the buttons only give me the cute
message. I think I need to modify this code...

With .Controls.Add(Type:=msoControlButton)
.OnAction = "'" & ThisWorkbook.Name & "'!" & MacNames(iCtr)
.Caption = CapNamess(iCtr)
.Style = msoButtonIconAndCaption
.FaceId = 71 + iCtr
.TooltipText = TipText(iCtr)
End With

....changing ThisWorkbook.Name to reference personal.xls, but I'm apparently
not doing it right. Please help...

Dave Peterson

Linking custom toolbar to personal.xls
 
What did you put in the MacNames array?

Did you use the names of the macros that were in the personal.xls workbook?

What cute messages do you see?



Giggly4g wrote:

Hi! I've created a custom toolbar (using Dave Peterson's code) and saved it
as an add-in. I set up several macros that were assigned to the toolbar.
Everything was working just fine until I took the macros from a "regular"
file and put them into my personal.xls. Now the buttons only give me the cute
message. I think I need to modify this code...

With .Controls.Add(Type:=msoControlButton)
.OnAction = "'" & ThisWorkbook.Name & "'!" & MacNames(iCtr)
.Caption = CapNamess(iCtr)
.Style = msoButtonIconAndCaption
.FaceId = 71 + iCtr
.TooltipText = TipText(iCtr)
End With

...changing ThisWorkbook.Name to reference personal.xls, but I'm apparently
not doing it right. Please help...


--

Dave Peterson


All times are GMT +1. The time now is 01:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com