PC Review


Reply
Thread Tools Rate Thread

Creating User Forms

 
 
wutzke
Guest
Posts: n/a
 
      14th Jun 2008
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?
 
Reply With Quote
 
 
 
 
Jim Rech
Guest
Posts: n/a
 
      14th Jun 2008
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" <(E-Mail Removed)> wrote in message
news:de28b2be-2950-4639-a698-(E-Mail Removed)...
> 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?



 
Reply With Quote
 
wutzke
Guest
Posts: n/a
 
      15th Jun 2008
Thanks

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating Dropdown in forms and User ID Stizzo Microsoft Access Forms 3 16th Oct 2008 11:10 PM
TASKS Creating Forms ( Task Request Form, Respond Forms) AMINOCARD Microsoft Outlook Discussion 0 24th Jun 2008 06:40 AM
Using User Creating Forms David C. Holley Microsoft Outlook VBA Programming 6 25th Jan 2005 10:54 PM
Wizard for creating a new user control is DIFFERENT on code generation than Forms, inconsistend by a lazy wizard dev news.microsoft.com Microsoft Dot NET Framework Forms 4 2nd Nov 2003 07:02 PM
Creating user input forms, help... Ray Lavelle Microsoft Dot NET 0 10th Oct 2003 07:26 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:49 PM.