[SOLVED] Run Macro Automatically When Excel 2003 Opens


"Excel VBA Help"

 


To stop seeing these ads and get other benefits check This page!
Automatic Translations (Powered by Powered by Google )
Catalan Chinese Croatian Czech Danish Dutch English Finnish French Galician German Greek Hindi Indonesian Italian Japanese Korean Latvian Lithuanian Norwegian Persian Polish Portuguese Romanian Serbian Slovak Slovenian Spanish Swedish Thai Turkish Ukrainian Vietnamese
Go Back   The Code Cage Forums > Microsoft Topics > Microsoft Excel Forum
Page showing the last 10:-
The Code Cage - Microsoft Office help


Microsoft Excel Forum Members Post questions in this forum if they are related to using Microsoft Excel, this includes Worksheet Functions, Excel VBA Programming, Simple Macro Code & Charting, Excel formula etc.

New Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 7th May 2010, 16:00
CBender's Avatar
CBender
Newsgroup Contributor
 
Posts: n/a
My Top Tip Count:
Chats:
Default Run Macro Automatically When Excel 2003 Opens
     Excel: General   


!!! HELP PLEASE !!!!!


I have a password protected MS Excel 2003 spreadsheet with several Pivot
Tables and numerous tabs collecting and displaying data based on these Pivot
Tables.

Specific individuals can open this MS Excel 2003 file for updates using a
password and others simply open the file in "Read Only" mode.

I have seven (7) Pivot Tables I need to have refreshed each time the MS
Excel 2003 file opens. I created a macro called "RefreshAllPivotTables" in
This Workbook. The macro goes to each of the Pivot Tables and refreshes the
linked data when you use "ctrl+u".

I need to ensure that each of the Pivot Tables always display the latest
information available. However, our directors and managers find it too
"inconvenient" to run the macro to refresh the data themselves.

Thus I have been trying to get this macro to run automatically when the MS
Excel 2003 file opens.

I selected the third tab called "R3 Total" (there are a total of fifteen
(15) tabs in this MS Excel 2003 file) and selected "View Coding". Using the
VB Editor, I entered the following code:


Option Explicit
Sub Auto_Open()
Call RefreshAllPivotTables
End Sub


It doesn't seem to matter if I open the MS Excel 2003 file in "Read Only"
mode or use the password to open the file, my stored macro fails to execute
automatically. Does it matter which tab is used or opened first? I need my
"RefreshAllPivotTables" macro to run regardless of which of the fifteen (15)
tabs are opened first.

A co-worker mentioned that MS Excel 2003 no longer supports auto-run macro
functions when a file opens. Is this true or am I simply doing something
wrong?

Any HELP would be appreciated.

Thanks,
--
Chip

Reply & Quote Reply


Did you find this post helpful? Yes | No
The Code Cage Advertisment
Advertisement
  #2 (permalink)  
Old 7th May 2010, 16:34
Jim Thomlinson's Avatar
Jim Thomlinson
Newsgroup Contributor
 
Posts: n/a
My Top Tip Count:
Chats:
Default RE: Run Macro Automatically When Excel 2003 Opens

------ Register to get rid of these "In Post" ads! ------


Warning

Warning



Sorry but you need to register for FREE to see the rest of these posts. Please click HERE to register.

We only allow guests to see the first post of every thread to keep valuable resources for our members.






Reply & Quote Reply


Did you find this post helpful? Yes | No
  #3 (permalink)  
Old 7th May 2010, 17:28
Dave Peterson's Avatar
Dave Peterson
Newsgroup Contributor
 
Posts: n/a
My Top Tip Count:
Chats:
Default Re: Run Macro Automatically When Excel 2003 Opens

------ Register to get rid of these "In Post" ads! ------


Warning

Warning



Sorry but you need to register for FREE to see the rest of these posts. Please click HERE to register.

We only allow guests to see the first post of every thread to keep valuable resources for our members.






Reply & Quote Reply


Did you find this post helpful? Yes | No
The Code Cage Advertisment
Advertisement
New Reply
The Code Cage at Facebookhe Code Cage at Twitter


Tags
2003, automatically, excel, macro, opens, run

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


The Code Cage Affilliates


To stop seeing these ads and get other benefits check This page!


http://www.thecodecage.com/forumz tested by McAfee Security http://www.thecodecage.com/forumz tested by McAfee Security

All times are GMT +1. The time now is 22:30.


Multilingual community supported by vBET Translator 3.6.3
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
SEO by vBSEO
Template-Modifications by TMS
No part of this board, functionality or creatives may be copied or reproduced either in part or full without the express permission of The Code Cage Team.
Copyright © Simon Lloyd 2008 - 2013
We are not associated with nor employed by Microsoft in any way, we simply provide resources!
All MS office icons are registered trademarks of the application they represent and are used with permission from Microsoft
UA-8135493-1
Cultural Forum | Study at Malaysian University