R
Rob Blackmore
Hi,
I have an addin that adds a ControlButton to the Cell CommandBar as follows:
'/// Read Cell Commandbar and add "View Data"
Set oCellCommandBar = Application.CommandBars("Cell")
If oCellCommandBar.FindControl(, , "ViewData") Is Nothing Then
Set oButton = oCellCommandBar.Controls.Add(msoControlButton)
oButton.Caption = "View Data..."
oButton.OnAction = "ViewData"
oButton.Tag = "ViewData"
End If
Which works fine. However, I want to control enabling / disabling it
dependent upon when the cell menu is shown (e.g. only if the selected cell is
valid for the action).
Is this possible in VBA for Excel 2002? If so, I cannot see where to add
the code to be run when this menu is displayed?
Thank you
Rob
I have an addin that adds a ControlButton to the Cell CommandBar as follows:
'/// Read Cell Commandbar and add "View Data"
Set oCellCommandBar = Application.CommandBars("Cell")
If oCellCommandBar.FindControl(, , "ViewData") Is Nothing Then
Set oButton = oCellCommandBar.Controls.Add(msoControlButton)
oButton.Caption = "View Data..."
oButton.OnAction = "ViewData"
oButton.Tag = "ViewData"
End If
Which works fine. However, I want to control enabling / disabling it
dependent upon when the cell menu is shown (e.g. only if the selected cell is
valid for the action).
Is this possible in VBA for Excel 2002? If so, I cannot see where to add
the code to be run when this menu is displayed?
Thank you
Rob