Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 154
Default Userform Question - is this possible?

Confirmation it seems "do-able" ..... Thanks.
A sample structure to get me started... Thanks again.

Regards.

"Shawn O'Donnell" wrote in message
...
"Stuart" wrote:
I would like to show a userform, force certain textboxes
to be filled, then permit user to "Save".
"Save" would:

<snip

All of that seems doable. You might do things in a slightly different
order:

1. Export the form
2. Prompt for the name of the new Workbook, then create it.
3. Import the form into the new Workbook.
4. Copy the control settings from the old form to the new form.
5. Mess with the code in the new Workbook.

You can export the form with something like this:

Workbooks("Book1.xls").VBProject.VBComponents("Use rform1").Export
("temp.bas")

and import it with

Workbooks("Book2.xls").VBProject.VBComponents.Impo rt ("temp.bas")

You can be more specific about the file path, etc.

Export/Import preserves the layout & code of the form, but not its state.

Looping through the controls collection to copy control states is a little
tedious because each type of form has its own properties.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question regarding UserForm TotallyConfused Excel Discussion (Misc queries) 0 September 3rd 09 09:38 PM
Userform Question Greg B Excel Discussion (Misc queries) 3 March 10th 05 10:46 AM
UserForm Question jer Excel Programming 4 January 13th 05 11:19 PM
UserForm Question bforster1[_25_] Excel Programming 1 November 6th 04 01:21 PM
Userform question David Goodall Excel Programming 5 May 12th 04 10:18 AM


All times are GMT +1. The time now is 02:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"