UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Programmatic Access to Excel (Office) XP/2003 VBA Projects    
 
   
KingMartin
post Oct 3 2005, 09:09 AM
Post#1


Retired Moderator
Posts: 10,959
Joined: 9-October 03
From: Prague,CZ / Kiev,UA


Hello,
aving been freshly migrated to Office 2003, today I wondered why this trivial code:
CODE
Sub GetListOfRefs()
    Dim rf As Reference
    For Each rf In ThisWorkbook.VBProject.References
        Debug.Print rf.Name
    Next
End Sub

wouldn't work. It returned a "Programmatic Access to VBA Project denied" error. The message appeared only once, then just the confusing message
"VBProject method failed"
appears over and over.
HAs everybody knows, MS has somewhat enhanced the Office security model since XP. I have found the solution to the above mentioned problem here:
http://support.microsoft.com/kb/282830/
Oknow that it's pretty obvious for all XP freaks around here, but it took me some 15 minutes of my life to find out so I thought it could be good contribution to FAQs...
frown.gif
Martin
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    17th December 2017 - 06:21 PM