Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've seen newsgroup messages back to 1999 trying to deal
with the problem where the CodeName property returns a blank string unless the VBE gets "invoked" by one means or another. One of the simples solutions I've seen suggested fixing this problem by simply making a reference to the VBProject object as shown below: Sub GetCodeName() ' Uncomment these two lines and .CodeName works ' because the VBProject object gets referenced. 'Dim s As String 's = ActiveWorkbook.VBProject.Name MsgBox "CodeName = " & ActiveSheet.CodeName End Sub However, in Excel 2002 (and higher I assume) any reference to the VBProject object results in the error "Programmatic access to Visual Basic Project is not trusted". You can make this error go away by enabling Tools Macros Security Trusted Souces Trust access to Visual Basic Project. Here's the problem. I must use the CodeName property in my Add-In that needs to work in Excel 2000 and higher. I really do not want to have to require the user to enable "Trust access to Visual Basic Project" in order for my Add-In to work properly on Excel 2002 and higher. Help! Does anyone have a solution for me? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2002: Can I not overwriting non blank destination cells ? | Excel Discussion (Misc queries) | |||
Excel 2002: Return blank when VLOOKUP on blank cells | Excel Discussion (Misc queries) | |||
Excel 2002: How to add blank spaces to text and numbers | Excel Discussion (Misc queries) | |||
Excel 2002 : Problem in moving along blank cells | Excel Discussion (Misc queries) | |||
How can Excel 2002 start with blank workbook? | Excel Discussion (Misc queries) |