We have moved from Excel 2007 to Excel 2016 (Office 365). I have several macros that use vba to add a cell context (right click) menu item.
All worked before, but it seems moving from multiple document interface to single document interface has caused these to not work as planned.
I can open the macro workbook and the menu item(s) are there. But in the data workbook (where the right click happens), they are not showing. Does the order of opening the workbooks matter (i.e. macro first, then data or data, then macro)? And does it matter if the data workbook is opened from Outlook?
Any and all suggestions appreciated.
Thanks
This is my code:
Sub Menu_Copy_Data()
On Error GoTo one
If CommandBars("Cell").Controls("Copy Garnishment Data").Visible Then
Exit Sub
End If
one:
Dim ThisItem As Object
Set ThisItem = CommandBars("Cell").Controls.Add
With ThisItem
.Caption = "Copy Garnishment Data"
.OnAction = "Data_Copy"
.BeginGroup = True
End With
End Sub
All worked before, but it seems moving from multiple document interface to single document interface has caused these to not work as planned.
I can open the macro workbook and the menu item(s) are there. But in the data workbook (where the right click happens), they are not showing. Does the order of opening the workbooks matter (i.e. macro first, then data or data, then macro)? And does it matter if the data workbook is opened from Outlook?
Any and all suggestions appreciated.
Thanks
This is my code:
Sub Menu_Copy_Data()
On Error GoTo one
If CommandBars("Cell").Controls("Copy Garnishment Data").Visible Then
Exit Sub
End If
one:
Dim ThisItem As Object
Set ThisItem = CommandBars("Cell").Controls.Add
With ThisItem
.Caption = "Copy Garnishment Data"
.OnAction = "Data_Copy"
.BeginGroup = True
End With
End Sub