Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Can you control Configurations through VB and Excel?

Status
Not open for further replies.

Gwen07

Mechanical
Mar 6, 2007
2
It is possible to control a configuration through VB? I would like to create a drop down box in Excel That would link to a configuration changing about 10 dimensions in a part. I want have two separate parts in a top level assembly change to the same configuration. What is the simplest way to accomplish this?

Thank you!

Gwen
 
Replies continue below

Recommended for you

The most flexible drop down box to use with VB code can be selected from the Control Toolbox tool bar rather than the Forms tool bar. The Control Toolbox contains the Combo Box activeX control (simillar to the drop down) which can initiate code in response to an event that occurs in the spreadsheet. For example you can create event procedures for any of the following events associated with the combobox:

BeforeDragOver
BeforeDropOrPaste
Change
DblClick
DropButtonClick
Error
GotFocus
KeyDown
KeyPress
KeyUp
LostFocus
MouseDown
MouseMove
MouseUp

The combobox has properties

LinkedCell which you can use to link the combo box selection to a cell in the worksheet containing the combobox

ListFillRange which you can use to populate the Combobox using a list located in a range of cells on the worksheet.

It is also possible to change the list on the fly using the addItem method.

Gwen, you asked
It is possible to control a configuration through VB?
the short answer is yes. However, it takes a little practice. Start by exploring the VB Editing environment. Use Alt-F11 to get there.

 
I have used VB to link Dimensions to Excel Cells. But I do not know the syntax for controlling configurations through VB. I would like to link a drop down box value to a confutations name.

Yesterday I downloaded Drive Works which may be the solution to my problem.

Thank you very much for your response! Have you worked with drive works by chance?


Gwen
CSWP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor