Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Saving MSForm.Control (s) created at Runtime?

I have a CreateControl procedure behind a command button on an Excel
MSForms.Userform.

It creates various controls (combobox, textbox, checkbox, etc) in a row on
the form. This allows the user to add or delete and set any number of new
rows of control values.

I would like to be able to allow the user to Save the controls and all of
the properties (control.width; control.value; control.listrow, etc) that s/he
has created.

This way the next time the form is opened, the controls and their settings
don't have to be recreated - but can be added or substracted depending on
that session's requirements and usage of the form and it's underlying
procedures.

Is this possible and, if so, how?

Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Saving MSForm.Control (s) created at Runtime?

Not sure if it will work, but if you export the form from the VBE whilst
it's running, you get a text file of all the setting. May be useful.
Otherwise, just run through the .Controls collection, saving each controls
properties, in some format, ini file, xml etc then read back when needed.
Need to be careful with frame etc that act as containers.

NickHK

"Post Tenebras Lux" wrote in
message ...
I have a CreateControl procedure behind a command button on an Excel
MSForms.Userform.

It creates various controls (combobox, textbox, checkbox, etc) in a row on
the form. This allows the user to add or delete and set any number of new
rows of control values.

I would like to be able to allow the user to Save the controls and all of
the properties (control.width; control.value; control.listrow, etc) that

s/he
has created.

This way the next time the form is opened, the controls and their settings
don't have to be recreated - but can be added or substracted depending on
that session's requirements and usage of the form and it's underlying
procedures.

Is this possible and, if so, how?

Thanks.



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
Assigning events to runtime-created controls - is it possible? BizMark Excel Discussion (Misc queries) 1 November 20th 06 09:36 AM
Runtime error for macro that works in workbook created in Crystal Excel Discussion (Misc queries) 1 June 22nd 05 08:43 PM
Deleting a textbox control at runtime Grant Williams Excel Programming 3 June 14th 04 08:33 AM
Calendar Control: Can't exit design mode because control can't be created Rone Excel Programming 0 May 24th 04 04:01 PM
runtime Control and code in VBA Anu Excel Programming 1 January 12th 04 04:44 AM


All times are GMT +1. The time now is 03:42 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"