I have an Excel Workbook "MenuUpdateTest.xls". On Workbook Open(), code is triggered which adds new item to standard command bar. First item under menu correctly returns the current full path of the ActiveWorkbook (C:\CodeTest\Excel_Workboo
s. So far so good. Save as an add-in (.xla). Close everything. Open random workbook (Q:\FredOrderSheet.xls). Tick off add-in and menu is created. However, the item on menu bar returns the path of the add-in (C:\users\rjusa\AppData\Ro
a). NOT what I expected! ! How do I reference the "Fred" (thought active?) workbook??? Confused. Thanks, Ron.
Dim cbpop As CommandBarControl, cbctl As CommandBarControl, cbsub As CommandBarControl
Set cbpop = CommandBars("Worksheet Menu Bar").Controls.Add(Type:=msoControlPopup, Temporary:=True)
.Caption = "MenuTest"
.Visible = True
actvWb = ActiveWorkbook.Name
cp = ActiveWorkbook.Path
currAppFullPath = ActiveWorkbook.FullName
Set cbsub = cbpop.Controls.Add(Type:=msoControlPopup)
.Enabled = False
.BeginGroup = False
.Caption = "" & currAppFullPath & ""