![]() |
Update from Excel 97 to 2007
I have recently upgraded to Excel 2007 from Excel 97 and following code is
not working in Excel 2007: Sub Test() 'Get name of active VB project MsgBox Application.VBE.ActiveVBProject.Name End Sub |
Update from Excel 97 to 2007
Trade in your 2007 for 2003.
Mike F "Joakim Norrman" <Joakim wrote in message ... I have recently upgraded to Excel 2007 from Excel 97 and following code is not working in Excel 2007: Sub Test() 'Get name of active VB project MsgBox Application.VBE.ActiveVBProject.Name End Sub |
Update from Excel 97 to 2007
Hi,
That code works for me in 2007. I did have to allow access to VB projects first in order to avoid the warning message. Office button Excel Options Trust Center Trust Center Settings Macro Settings Developer Macro Settings Trust access to the VBA project object model. If not this can you give details of the actual error or what does not work? Cheers Andy Joakim Norrman wrote: I have recently upgraded to Excel 2007 from Excel 97 and following code is not working in Excel 2007: Sub Test() 'Get name of active VB project MsgBox Application.VBE.ActiveVBProject.Name End Sub -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info |
Update from Excel 97 to 2007
This is a security thing, not an Excel 2007 thing.
It doesn't work in 2003 or 2002 unless you follow Andy's reply and allow VBA access to VB Projects. In 2003: Tools menu Macro Security Trusted Publishers tab, check the checkbox. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "Mike Fogleman" wrote in message . .. Trade in your 2007 for 2003. Mike F "Joakim Norrman" <Joakim wrote in message ... I have recently upgraded to Excel 2007 from Excel 97 and following code is not working in Excel 2007: Sub Test() 'Get name of active VB project MsgBox Application.VBE.ActiveVBProject.Name End Sub |
Update from Excel 97 to 2007
Thanks Andy.
Works fine now. "Andy Pope" wrote: Hi, That code works for me in 2007. I did have to allow access to VB projects first in order to avoid the warning message. Office button Excel Options Trust Center Trust Center Settings Macro Settings Developer Macro Settings Trust access to the VBA project object model. If not this can you give details of the actual error or what does not work? Cheers Andy Joakim Norrman wrote: I have recently upgraded to Excel 2007 from Excel 97 and following code is not working in Excel 2007: Sub Test() 'Get name of active VB project MsgBox Application.VBE.ActiveVBProject.Name End Sub -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info |
All times are GMT +1. The time now is 03:58 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com