A
asmithbcat
I have the following code saved in a file on a network to add an item to the
cell shortcut list once right-clicked.
ThisWorkbook code
Private Sub Workbook_Activate()
AddItemToShortcut
End Sub
Private Sub Workbook_Deactivate()
ResetCellShortcut
End Sub
Sub AddItemToShortcut()
Dim NewItem As CommandBarControl
Set NewItem = CommandBars("Cell").Controls.Add(Type:=1, Before:=1,
Temporary:=True)
NewItem.Caption = "Add New Date"
NewItem.OnAction = "NewDate"
NewItem.BeginGroup = True
End Sub
Sub ResetCellShortcut()
CommandBars("Cell").Reset
End Sub
I believe the "Add New Date" feature should be available on any sheet within
the workbook once a cell is right-clicked. However, this function is only
available on certain sheets within the workbook.
This file is on a network, and multiple users are opening and closing the
file. Could this have lead to the issue? I also have previously saved a
test file on my desktop with the exact same code in it which works fine.
This led me to believe having multiple users open it could have created the
problem.
Thanks
cell shortcut list once right-clicked.
ThisWorkbook code
Private Sub Workbook_Activate()
AddItemToShortcut
End Sub
Private Sub Workbook_Deactivate()
ResetCellShortcut
End Sub
Sub AddItemToShortcut()
Dim NewItem As CommandBarControl
Set NewItem = CommandBars("Cell").Controls.Add(Type:=1, Before:=1,
Temporary:=True)
NewItem.Caption = "Add New Date"
NewItem.OnAction = "NewDate"
NewItem.BeginGroup = True
End Sub
Sub ResetCellShortcut()
CommandBars("Cell").Reset
End Sub
I believe the "Add New Date" feature should be available on any sheet within
the workbook once a cell is right-clicked. However, this function is only
available on certain sheets within the workbook.
This file is on a network, and multiple users are opening and closing the
file. Could this have lead to the issue? I also have previously saved a
test file on my desktop with the exact same code in it which works fine.
This led me to believe having multiple users open it could have created the
problem.
Thanks