Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Creating User Forms

Is there a way to create a user form programically?
If I had values in a row (item 1, item2, item3, ...)
and values in the next row representing quantities
can VB create a user form dynamically from these cells?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 533
Default Creating User Forms

The VBE is programable so, yes, you could create a userform in the VBE.
You'd set a reference to Microsoft Visual Basic for Application
Extensibility 5.3 and start with code like this:

ActiveWorkbook.VBProject.VBComponents.Add vbext_ct_MSForm

You'd have to set "Trust access to Visual Basic Project" on under Tools,
Macro, Security _in Excel_ before this code will be allowed to run. (Macro
virus protection).

However I don't know why you'd want to do that. The better way is to create
the userform via the designer in the VBE and add the stock controls you'll
need. Then during the Initialize event your code can customize its
appearance dynamically using, if you want, variables in the sheet.

--
Jim
"wutzke" wrote in message
...
Is there a way to create a user form programically?
If I had values in a row (item 1, item2, item3, ...)
and values in the next row representing quantities
can VB create a user form dynamically from these cells?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Creating User Forms

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
VBA User Forms CJ-22[_2_] Excel Programming 3 March 6th 06 07:45 PM
User Forms Runner77 Excel Discussion (Misc queries) 1 January 12th 06 06:20 AM
user forms Runner77 Excel Discussion (Misc queries) 0 January 12th 06 04:31 AM
creating fax forms nana72 Excel Discussion (Misc queries) 2 November 9th 05 03:19 PM
User Forms Sgwapt Excel Programming 5 June 26th 04 09:36 AM


All times are GMT +1. The time now is 08:25 AM.

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

About Us

"It's about Microsoft Excel"