Can't Run Code using Run>Run Sub/User Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Whenever I'm in the code window and select Run>Run Sub/User Form I always get
a dialog box to select a macro. I don't want to do that. I want to run the
code where I have placed my cursor. What's going on?
 
If the sub or function are getting parameters, but you are not passing any it
will give you that message

e.g
Function MyFunctionName(Variable as Long)
If youll run this code it will as for the value

You should run it using the immidiate windows (Ctrl+G)

?MyFunctionName(1)
 
Thanks Ofer. I don't think that's my problem. Even when I try to run code
as simple as . . .

Public Sub Test()
MsgBox "hello"
End Sub

.. . . I still get the macro dialog box when I select Run>Run Sub/User Form
with my cursor in the subroutine.

Does anybody have any other ideas?
 
I have the same problem. It won't run on the simplist funtion or subroutine.
It happens on and off at times. Is this a microsoft bug? What is going
on.
 
Back
Top