Copy form and paste to notepad

B

bill_morgan_3333

Is there a way to copy an Access Form and then paste it into Notepad so that
I can see the Form as VBA code?

Thanks,

Bill Morgan
 
J

John Vinson

Is there a way to copy an Access Form and then paste it into Notepad so that
I can see the Form as VBA code?

Thanks,

Bill Morgan

Since the Form does not consist of VBA code, you cannot. A Form is
stored in Access' systems tables in an undocumented binary blob
object.

You can use the undocumented VBA Application.SaveAsText method to
write the form out to a (very verbose) text file; this is NOT VBA
code, though it will contain any VBA code that is in the Form's
Module. In the Immediate window try

Application.SaveAsText(acForm, "MyFormName", "E:\somepath\Filename")



John W. Vinson[MVP]
 
B

bill_morgan_3333

John. I had a vague memory of copying Access objects into Notepad as code -
thanks for the clarification ...
 

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