Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default 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






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default 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
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel 2007 Charts don't update Steve Excel Discussion (Misc queries) 4 November 1st 10 03:25 PM
Pivottable update Excel 2007 Mikmac Excel Discussion (Misc queries) 0 August 19th 09 02:17 PM
My links will not update Excel 2007 dverna Excel Discussion (Misc queries) 0 May 5th 08 06:52 PM
Auto-update in Excel 2007 Will Mac Excel Discussion (Misc queries) 1 January 30th 08 01:37 PM
update links excel 2007 Shooter Excel Worksheet Functions 0 December 10th 07 04:00 PM


All times are GMT +1. The time now is 10:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"