Error on Custom Forms

  • Thread starter Bryan Dickerson
  • Start date
B

Bryan Dickerson

I'm trying to disable a command bar that has occassionally caused problems
in a custom form. I came up with this routine:

Sub SetCmdBars(ByVal boolVal)
Dim oF
Dim oCB

Set oF = Item.GetInspector
For Each oCB in oF.CommandBars
If oCB.Name = "Standard" Then
oCB.Enabled = boolVal
oCB.Visible = boolVal
End If
Next
oF.CommandBars("View").Enabled = boolVal
oF.CommandBars("Tools").Enabled = boolVal
oF.CommandBars("Actions").Enabled = boolVal
End Sub

.... and some users are getting the error message:
"You don't have appropriate permission to perform this operation." and the
line number points to the script code line: "Set oF = Item.GetInspector".

Anyone have any ideas?

Thanx!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Script Error in Custom Form 5
Custom Forms script error 10
RunWhen error 4
Code Stopped 2
Impossible? - Close code 1
Time close and save 0
Close help 2
Help! Combine Macros 2

Top