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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help! New to VBA, Autonew can't find the form sometimes

Status
Not open for further replies.

hjasonk

Technical User
Apr 15, 2004
1
US
I made a autonew macro to open a userform name frmUpdate. I put the macro in that template only. the form name is correct and I do see the form. Form also runs by itself ok. The following is the macro I wrote which is very simple. In some templates, it show the form ok but in other template I get a message saying "run-time error 424, Objects not found". Why does this work sometimes and not in other times?
Thank you for your help.

Sub AutoNew()
'
' AutoNew Macro
' Macro created 04/15/2004 by kang_jason
'
frmUpdate.Show

End Sub
 
Well, I'm throwing a guess out here but do you have reference(s) to object(s) that some machines may have referenced and other not? The code above you show would not cause that problem but something in your form might. Try using late binds and see if it helps. If it's not references, then try showing more of your code so we can try to help.

Paul D
[pimp] pimpin' aint easy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top