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

Excel VBA doesn't recognize DoCmd

Status
Not open for further replies.

Paladyr

Programmer
Apr 22, 2001
508
US
Does anyone know what references if any I need to have installed in order to use this:

DoCmd.OpenForm "FormName"

??????

I just got a new PC and it didn't give me the drop down acknowledging that it recognized DoCmd. Thanks for the help!
 
It sounds to me as though your an MS Access user trying to work with Excel VBA. I don't believe Docmd is available in Excel VBA. What exactly are you trying to do?
 
I thought I read online that I could do this, but perhaps I am wrong :). I created a form in Excel and simply want to open it. I know I can use a command object but I don't know the syntax. Thanks for the help!
 
Duh, here it is:

frmMainMenu.Show

:)

I don't have the help files installed right now so I couldn't check myself :).
 
Click on
Code:
DoCmd
and hit F1 while in VBA. If the help file comes up, then that'll tell you if it's a recognized command. Could be that it was replaced by a new method/object in Office 2K. I'm not an Access user, so I couldn't tell you. ----------------------------------------
If you are reading this, then you have read too far... :p

lightwarrior@hotmail.com
 
To load a UserForm called UserForm1 into memory, without making it visible you use the load statement:

Load UserForm1

To unload:

Unload UserForm1


To make UserForm1 visible, use the Show method:

UserForm1.Show

If you show a UserForm that has not been loaded, it will be automatically loaded. You can hide the Form using:

UserForm1.Hide

Hope that helps!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top