Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default Using VBA to open Excel , Auto_Open Procedure not running

Hi Reader

I have below code for Open Excel by VBA. The Excel have Auto_open
Procedure can not able to run.

I already set Secuiry Level to Low.

How to chang below coding ?


On Error GoTo OpenError
Workbooks.Open Filename:=loFilename, UpdateLinks:=2

On Error GoTo 0

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Using VBA to open Excel , Auto_Open Procedure not running

When you open a workbook with VBA code, the Auto_Open macro does not run.
This is by design. You can run them with code like

ActiveWorkbook.RunAutoMacros xlAutoOpen


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"moonhk" wrote in message
ups.com...
Hi Reader

I have below code for Open Excel by VBA. The Excel have Auto_open
Procedure can not able to run.

I already set Secuiry Level to Low.

How to chang below coding ?


On Error GoTo OpenError
Workbooks.Open Filename:=loFilename, UpdateLinks:=2

On Error GoTo 0


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default Using VBA to open Excel , Auto_Open Procedure not running

On 11 2 , 6 38 , "Chip Pearson" wrote:
When you open a workbook with VBA code, the Auto_Open macro does not run.
This is by design. You can run them with code like

ActiveWorkbook.RunAutoMacros xlAutoOpen

--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consultingwww.cpearson.com
(email on the web site)

"moonhk" wrote in message

ups.com...



Hi Reader


I have below code for Open Excel by VBA. The Excel have Auto_open
Procedure can not able to run.


I already set Secuiry Level to Low.


How to chang below coding ?


On Error GoTo OpenError
Workbooks.Open Filename:=loFilename, UpdateLinks:=2


On Error GoTo 0- -


- -


Than, It works

My coding as below
On Error GoTo OpenError
Workbooks.Open Filename:=loFilename, UpdateLinks:=2
ActiveWorkbook.RunAutoMacros xlAutoOpen

On Error GoTo 0

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
SOS! how do I run Excel without running the VBA in AUTO_OPEN? LunaMoon Excel Discussion (Misc queries) 1 May 4th 10 02:41 PM
running Access procedure from Excel savalou Excel Programming 5 September 14th 07 09:12 PM
Running Ontime's procedure while another function is running? Enter The Excel Programming 1 May 11th 07 05:58 AM
Opening an Access Database and running procedure Via Excel VBA Paul Faulkner Excel Programming 0 June 7th 06 02:17 PM
Auto_Open not running when file opened normally Ron Ruble Excel Programming 11 September 21st 03 05:18 PM


All times are GMT +1. The time now is 04:44 PM.

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

About Us

"It's about Microsoft Excel"