Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
jeh jeh is offline
external usenet poster
 
Posts: 6
Default How to run auto-open macro in Excel 2007?

For years I've been using an Excel 2000 workbook (under Win XP)
containing several macros, one of which is auto-opened at launch. (It
performs necessary date checks). Security has been set so that before
the workbook opens I get a warning text box asking me if I want to
enable or disable macros.

I've just ported the workbook to Office 2007 in a new computer running
Win 7 Pro. With this system I find that when the workbook opens (in
compatibilty mode), the current worksheet and the warning bar about
macros appear simultaneously. I can accept or reject macro operation
as I wish, but even if I accept it the auto-open macro hasn't run. Any
ideas how to get round this? I'm in unfamiliar territory with no
previous experience of Win 7 and not much of Office 2007. Have I just
missed something simple?

I can't use self-signed certificates because the workbook will be used
on more than one computer.

TIA John
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default How to run auto-open macro in Excel 2007?

I don't use win7, but I've never experienced any problems with my auto_open or
workbook_open procedures that were written in xl97 to xl2003 when opened in
xl2007.

I allow macros to run and they fire successfully.

Maybe it's the macro itself????

Could you add a
msgbox "Running"
as the first line inside the code--just to see if the code actually starts???

jeh wrote:

For years I've been using an Excel 2000 workbook (under Win XP)
containing several macros, one of which is auto-opened at launch. (It
performs necessary date checks). Security has been set so that before
the workbook opens I get a warning text box asking me if I want to
enable or disable macros.

I've just ported the workbook to Office 2007 in a new computer running
Win 7 Pro. With this system I find that when the workbook opens (in
compatibilty mode), the current worksheet and the warning bar about
macros appear simultaneously. I can accept or reject macro operation
as I wish, but even if I accept it the auto-open macro hasn't run. Any
ideas how to get round this? I'm in unfamiliar territory with no
previous experience of Win 7 and not much of Office 2007. Have I just
missed something simple?

I can't use self-signed certificates because the workbook will be used
on more than one computer.

TIA John


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
jeh jeh is offline
external usenet poster
 
Posts: 6
Default How to run auto-open macro in Excel 2007?

Thanks Dave. Problem fixed. The auto-open macro does run as soon
once Macros are enabled. I was fooled by the worksheet appearing
before I could enable macros, the opposite of the sequence in xl2k.

John.



On Jan 24, 1:07*am, Dave Peterson wrote:
I don't use win7, but I've never experienced any problems with my auto_open or
workbook_open procedures that were written in xl97 to xl2003 when opened in
xl2007.

I allow macros to run and they fire successfully.

Maybe it's the macro itself????

Could you add a
msgbox "Running"
as the first line inside the code--just to see if the code actually starts???





jeh wrote:

For years I've been using an Excel 2000 workbook (under Win XP)
containing several macros, one of which is auto-opened at launch. *(It
performs necessary date checks). *Security has been set so that before
the workbook opens I get a warning text box asking me if I want to
enable or disable macros.


I've just ported the workbook to Office 2007 in a new computer running
Win 7 Pro. *With this system I find that when the workbook opens (in
compatibilty mode), the current worksheet and the warning bar about
macros appear simultaneously. *I can accept or reject macro operation
as I wish, but even if I accept it the auto-open macro hasn't run. Any
ideas how to get round this? *I'm in unfamiliar territory with no
previous experience of Win 7 and not much of Office 2007. *Have I just
missed something simple?


I can't use self-signed certificates because the workbook will be used
on more than one computer.


TIA * John


--

Dave Peterson- Hide quoted text -

- Show quoted text -


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default How to run auto-open macro in Excel 2007?


Just as a side note, the Auto_Open procedure (indeed all the Auto
procedures) does not run if the workbook is opened via code. For
example,

Dim WB As Workbook
Set WB = Workbooks.Open("C:\Test.xls")

The Auto_Open proc of C:\Test.xls will not be executed. You must call
it yourself if it needs to run:

WB.RunAutoMacros xlAutoOpen

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]




On Sat, 23 Jan 2010 14:05:25 -0800 (PST), jeh
wrote:

Thanks Dave. Problem fixed. The auto-open macro does run as soon
once Macros are enabled. I was fooled by the worksheet appearing
before I could enable macros, the opposite of the sequence in xl2k.

John.



On Jan 24, 1:07*am, Dave Peterson wrote:
I don't use win7, but I've never experienced any problems with my auto_open or
workbook_open procedures that were written in xl97 to xl2003 when opened in
xl2007.

I allow macros to run and they fire successfully.

Maybe it's the macro itself????

Could you add a
msgbox "Running"
as the first line inside the code--just to see if the code actually starts???





jeh wrote:

For years I've been using an Excel 2000 workbook (under Win XP)
containing several macros, one of which is auto-opened at launch. *(It
performs necessary date checks). *Security has been set so that before
the workbook opens I get a warning text box asking me if I want to
enable or disable macros.


I've just ported the workbook to Office 2007 in a new computer running
Win 7 Pro. *With this system I find that when the workbook opens (in
compatibilty mode), the current worksheet and the warning bar about
macros appear simultaneously. *I can accept or reject macro operation
as I wish, but even if I accept it the auto-open macro hasn't run. Any
ideas how to get round this? *I'm in unfamiliar territory with no
previous experience of Win 7 and not much of Office 2007. *Have I just
missed something simple?


I can't use self-signed certificates because the workbook will be used
on more than one computer.


TIA * John


--

Dave Peterson- Hide quoted text -

- Show quoted text -

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
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
Auto-open Excel and run macro MBais[_4_] Excel Programming 1 July 28th 05 01:19 PM
open up an excel program with an auto open macro [email protected] Excel Programming 2 July 17th 05 04:48 PM
Auto execute macro when open excel bris Excel Programming 2 September 21st 04 09:52 AM


All times are GMT +1. The time now is 12:27 PM.

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"