Log in

View Full Version : VBA Help: Save form data to file named using info entered into form.



PStryder
06-14-2011, 10:06 AM
I have built a Word Macro enabled form, and I would like to code a command button in the form to save it (with the entered data) to a file named using the data entered into one of the text fields.

Each time CommandButton1 is clicked, I would like to create a new output file with the file name equal to the value of TextBox1.

The output file that gets saved can be in any format, so long as a PC loaded with Office 2007 can read it without the user having to do anything. (Install something, etc.)

I need the CommandButton1 to save without prompting for the location, or the filename.

I have found lots of stuff about saving the data to Access DBs, or exporting it to Excel, but I just want to save a file named using the data in a text box, and I can't find anything on how to accomplish this.

I am a VBA noob.