C
Cap Kirk
I have a macro that adds a code module in EXCEL It works fine in EXCEL 97.
Now I am using it in EXCEL 2003 ant it fails (runtime 440) with the message
"error in Add method of object _VBcomponents"
The code is:
With Application.VBE.ActiveVBProject
' Create and use a new module
With .VBComponents.Add(vbext_ct_StdModule) <== This is the offending code
line
"Add" gives an error
' Change the module name
.Name = "ModuloDeMacrosDelIndice"
' Use the code module
With .CodeModule
' Add the contents of a file
.AddFromFile Archivo$
End With
Any help will be welcome
Cap Kirk
Now I am using it in EXCEL 2003 ant it fails (runtime 440) with the message
"error in Add method of object _VBcomponents"
The code is:
With Application.VBE.ActiveVBProject
' Create and use a new module
With .VBComponents.Add(vbext_ct_StdModule) <== This is the offending code
line
"Add" gives an error
' Change the module name
.Name = "ModuloDeMacrosDelIndice"
' Use the code module
With .CodeModule
' Add the contents of a file
.AddFromFile Archivo$
End With
Any help will be welcome
Cap Kirk