Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, I get this error when opening an Excel-file with iLogic.
Unable to get the Open Property of the Workbook-Object.
Here is my code:
'define the file to create/open
myXLS_File = "C:\Users\Darrell.Johnson\Desktop\V1000101_20230119_105452.xlsm"
'Get the Inventor user name From the Inventor Options
myName= ThisApplication.GeneralOptions.UserName
'define Excel Application object
excelApp = CreateObject("Excel.Application")
'set Excel to run visibly, change to false if you want to run it invisibly
excelApp.Visible = True
'suppress prompts (such as the compatibility checker)
excelApp.DisplayAlerts = False
'check for existing file
If Dir(myXLS_File) <> "" Then
'workbook exists, open it
excelWorkbook = excelApp.Workbooks.Open(myXLS_File)
ExcelSheet = excelWorkbook.Worksheets(1)
Else
'workbook does NOT exist, so create a new one
excelWorkbook = excelApp.Workbooks.Add
End If
'Insert data into Excel.
A9 = excelWorkbook.Worksheets("Maßtabelle").Range("I11").Value
'close the workbook and the Excel Application
'uncomment if you want to close the xls file at the end
excelWorkbook.Close
excelApp.Quit
excelApp = Nothing
The code worked just fine before the Windows update yesterday.
Solved! Go to Solution.