Cannot Create ActiveX Component Excel Macro
Not applicable
01-20-2020
02:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I have a code that runs a macro inside an excel sheet which oddly sometimes works and sometimes doesnt. Same code, no changes at all.
Quite often I get the error saying "Cannot Create ActiveX Component"
When I try and run the rule multiple times back to back it cant run it after the first time.
Im thinking its because the file is open in a hidden state although I told ilogic to save & close the excel file.
Here's the code below:
Dim xlsxPath As String xlsxPath = "C:\Users\tm04.smeric\Desktop\Meric\WELD DETAIL LIST.xlsm" '''''' GoExcel.Open(xlsxPath, "Sheet1") '''MACRO''' Dim XL As Object ' XL = CreateObject("Excel.Application") XL = GetObject(, "Excel.Application") XL.Run("Module1.clearMacro") GoExcel.DisplayAlerts = False
' GoExcel.Save()
' GoExcel.Close()
Thanks in advance ![]()