Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic UserForm Macro

Status
Not open for further replies.

DickEp

Programmer
Sep 5, 2001
26
US
I am trying to get a macro that will take cell data and build a userform.

I would like to know how to:
1 - create a frame programmatically
2 - insert either optionbuttons or populate combo box in the frame
3 - save the userform after it is built.

Thanks
E
 



Hi,

You'll make out better, if you...

1. attempt to do your own coding and then ask for specific focused questions when your run into difficulty.

2. respond to the members who post in your thread, letting them know what worked and what did not work.

3. when appropriate, use the hyperlink in the lower left-hand portion of any post. The stars not only show your expression of gratitude, but also flag a post for other browsing members, as having valuable and helpful information.

Skip,
[sub]
[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue][/sub]
 
Thanks, I have posted in other areas but am new to VBA and all its introcessies.

I went to the FAQ and tried the code in faq707-5757 but get an error.

If you go to the code, the line with "Application.VBE.MainWindow.Visible = False" comes up with a 1004 error, Application-defined or object-defned error. Why?

Thanks again
E
 
Have you set your references (In the VBE, Tools->References)?

The FAQ calls out 3 references that must be set to run the code ( Visual Basic For Applications, Microsoft Excel Object Library, MS Forms 2.0 Object Library)
 
Yes, I checked the references, all set.

So..... still puzzled

E
 
DickEp,

This is a little "out there" but it tripped me up with a 1004 error a while back so I'll mention it. Under Tools, Macro, Security, Trusted Publishers, check-mark "Trust Access to Visual Basic Project". This may or may not solve your problem but it's worth a try.

Let us know if it works or not.

[glasses]

----------------------------------------------------------------------------------
"A committee is a life form with six or more legs and no brain." -- L. Long
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top