I provide the correct password
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open("H:\M\X\C.xls", 0, , , "password")
'any of these lines causes the mentioned error
Set vbcomp = objWorkbook.VBProject.VBComponents(modname)
objWorkbook.VBProject.VBComponents.Remove vbcomp
objWorkbook.VBProject.VBComponents.Import modpath & modtest
Any ideas what might be the problem? Tools-Macro-Security is configured to allow access to the VB project
source
share