Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

code won't run

Status
Not open for further replies.

tractorvix

Technical User
Jun 29, 2004
122
GB
This must be something so basic, but I just can't get my procedure to run. My cursor is in the procedure, I press F5 (or click on the blue play button) and all I get is a pop-up for Macros.

Am I being thick?

Vix
 
If your procedure is in a form or report module, this will happen. Put it in a module of its own. You will also get a pop-up if your procedure has required arguments.
 
Oops strike 'of its own', what I mean is standard module.
 
I've put it in a module. Still no joy.

Even this won't work


Sub PayDate(DTDate As Date)
MsgBox "Payment is due by " & DTDate

End Sub


Sub PurchaseDate(DTBought As Date)
PayDate DTBought

End Sub

Uber frustrating

Vix
 
What happens if you type:
[tt]?PayDate(now())[/tt]
in the immediate window?
 
You can't launch with F5 a procedure that expects arguments ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top