Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto_Open only on initial file open
I have a spreadsheet that uses CB macro Auto_Open today
that makes a data request and populates my spreadsheet the first time it is open. However, it does not rerun this macro on subequent openings of this file. This is my desired result. I am creating a new spreadsheet that also populates itself with a new set of data. However, every time I save and open the file, it adds in more data and moves the existing data to its right. This is not the desired result. Is there a setting I am missing or should I use a different command than Auto_Open. I do want this macro to run the first time I open the file but just not subsequent requests. Thanks for your help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto_Open only on initial file open
perhaps you could add the following line of code at the beginning of the
Auto_Open macro: If Not IsEmpty(Worksheets("Sheet1").Range("A1").Value) Then Exit Sub Where A1 is a cell that is populated when the file is opened for the first time. Gareth "Joe Granda" wrote in message ... I have a spreadsheet that uses CB macro Auto_Open today that makes a data request and populates my spreadsheet the first time it is open. However, it does not rerun this macro on subequent openings of this file. This is my desired result. I am creating a new spreadsheet that also populates itself with a new set of data. However, every time I save and open the file, it adds in more data and moves the existing data to its right. This is not the desired result. Is there a setting I am missing or should I use a different command than Auto_Open. I do want this macro to run the first time I open the file but just not subsequent requests. Thanks for your help. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto_Open only on initial file open
Running a query?
-- John johnf 202 at hotmail dot com "Joe Granda" wrote in message ... | I have a spreadsheet that uses CB macro Auto_Open today | that makes a data request and populates my spreadsheet | the first time it is open. However, it does not rerun | this macro on subequent openings of this file. This is | my desired result. | | I am creating a new spreadsheet that also populates | itself with a new set of data. However, every time I | save and open the file, it adds in more data and moves | the existing data to its right. This is not the desired | result. Is there a setting I am missing or should I use | a different command than Auto_Open. I do want this macro | to run the first time I open the file but just not | subsequent requests. | | Thanks for your help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to locate auto_open preventing search for lost file? | Excel Discussion (Misc queries) | |||
How can I disable macros after the initial open? | Excel Discussion (Misc queries) | |||
Auto_Open vs Open and call macro --priority question | Excel Programming | |||
Auto_Open not running when file opened normally | Excel Programming | |||
Workbook Open Vs Auto_Open | Excel Programming |