Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Anonymous
489 Views, 1 Reply

Cannot Create ActiveX Component Excel Macro

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 :slightly_smiling_face: