Message 1 of 5

Not applicable
01-26-2011
09:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Inventor 2011
So I'm using a parameter to launch an excel file that this specific Assembly references. It's not embedded.
I need the ability to launch the referenced excel file. I have a parameter called "Launch_Excel" with No and Yes as options.
I need to write it such that, if it detects "Yes", that it launches Excel, and also sets that value back to "No". I can't seem to get it to make this change while the parameter window is open. Do I need to force Inventor to close the parameter window?
Current code:
Format:HTML Format
Version:1.0
StartHTML: 165
EndHTML: 4650
StartFragment: 314
EndFragment: 4618
StartSelection: 314
EndSelection: 314
If Launch_Excel = "Yes" Then
Launch_Excel = "No"
Dim sheetName As String = ring_size
newExcelApp = CreateObject("Excel.Application")
newExcelApp.Visible = True
wb = newExcelApp.Workbooks.Open(IO.Path.Combine("X:\Autodesk\EVR Inventor Reference Files\", "retaining_ring_specs.xlsm"))
wb.Sheets(sheetName).Activate
End If
Solved! Go to Solution.