Adding a "Show Code" Button

  • Thread starter Thread starter Bill
  • Start date Start date
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
 
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
 
Back
Top