Adding a "Show Code" Button

B

Bill

I am trying to write a coding example for non VB users

How can I add a button to a form that will open up the VB code window for
that form?

There does not seem to be anything like DoCmd.Showcode " myform"

Thanks

Bill
 
S

SteveS

Bill said:
I am trying to write a coding example for non VB users

How can I add a button to a form that will open up the VB code window for
that form?

There does not seem to be anything like DoCmd.Showcode " myform"

Thanks

Bill

Look in Help for OpenModule.

This worked for me. The button name is Command29. Supply a module name as a
string. Click the button and the IDE opens. Add a procedure name and it will
open to the specified procedure in the specified module.

Using A2K and Win2K


Private Sub Command29_Click()
DoCmd.OpenModule "Module1"
End Sub

HTH
 

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

Top