N
Nigel
I am trying to run this code on workbook open and get the above error message
mode = EssVGetGlobalOption(5)
For Each ctl In CommandBars("essoption").Controls
If mode = 4 And (ctl.Caption Like "Warnings*") Then
ctl.Caption = "Warnings Off"
ElseIf mode = 2 And (ctl.Caption Like "Warnings*") Then
ctl.Caption = "Warnings On"
End If
Next ctl
the error is on the line For Each ctl In CommandBars("essoption").Controls
thanks
mode = EssVGetGlobalOption(5)
For Each ctl In CommandBars("essoption").Controls
If mode = 4 And (ctl.Caption Like "Warnings*") Then
ctl.Caption = "Warnings Off"
ElseIf mode = 2 And (ctl.Caption Like "Warnings*") Then
ctl.Caption = "Warnings On"
End If
Next ctl
the error is on the line For Each ctl In CommandBars("essoption").Controls
thanks