Hi,
I've been playing with some code to try and prevent a user from carrying out certain tasks from a custom menu when the work book is opened read only - basically to prevent them wasting time working on things then realising they can't save it as it's read only. The menu is created only when a specific sheet is active, and deleted when not.
However I can't quite get it to work, any ideas what I'm doing wrong? Sure it's something silly...
With ActionsMenu.Controls.Add(Type:=msoControlButton)
.Caption = "Add New Case"
.FaceId = 162
If ActiveWorkbook.ReadOnly = True Then
.Enabled = False
Else
.OnAction = "NewCase"
End If
End With
Any help appreciated.
Thanks, TC
Bookmarks