Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I have a long program written in Excel 97 and I have transferred to Excel 2000 when I run it, it gave me the following error: Run time error '1004' Programmatic Access to Visual Basic Project is not Trusted due to the section of the codes below: '--------------------Prepare Modules in New Workbook-------------------- 'Copy Modules ModName = ThisWorkbook.Path & "\Merit Worksheet Code.txt" For Each VBComponent In ThisWorkbook.VBProject.VBComponents 'Perform export and import module other than Excel objects If VBComponent.Type < vbext_ct_Document Then 'Export Module Import Module Delete Module Code File VBComponent.Export ModName NewBook.VBProject.VBComponents.Import ModName Kill ModName End If Next VBComponent '-------------------------------------------------------------------------- It worked fine in the Excel 97 why isn't it working for on my Excel 2000? Any hint would be greatly appreciated. Thanks. Anson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Trust access to visual basic project in XP systems | Excel Discussion (Misc queries) | |||
Trust access to visual basic project greyed out | Excel Discussion (Misc queries) | |||
Registry key for "Trust access to Visual Basic project" | Excel Programming | |||
'Programmatic access to Visual Basic project is not trusted.' message | Excel Programming | |||
Allow access to visual basic project | Excel Programming |