Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Larry Lehman
 
Posts: n/a
Default Macro does not run when data refreshed

I set up a worksheet at work that queries our lab
information system for incomplete high priority orders.
The results of the query are display in order by age,
oldest to newest. The Data Range Properties is set to
refresh the data every 2 minutes and overwrite existing
cells with new data and clear unused cells.

After new data is imported there is a Visual Basic macro
that compares the time of each order to the current PC
time and changes the color of the text from green to
yellow to red as the order ages. All of the works great.

I've recently duplicated this worksheet at a second
hospital lab and at that site the query works fine and the
macro works as expected when it's run manually. However
the macro does not run automatically when the data is
refreshed.

The only difference I can find between the two worksheets
is on File-Properties-Contents. The worksheet that works
as expected (macro runs whenever data is refreshed) shows
the Contents as:
Worksheets
Sheet1
Named Range
Query from MSQLLAB
The worksheet that does not run the macro when the data is
updated does not have the Named range.

What is causing the second worksheet not to recognize the
refresh of the data as a change in the worksheet? Both
worksheet have security set to low and niether PC is run
virus protection software.

Any help would be greatly appreciated.

Thanks,

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
Help with data not getting plotted Scott Ehrlich Charts and Charting in Excel 1 January 23rd 05 05:15 PM
Export Excel Data to Access With a Macro!!! Jac Excel Discussion (Misc queries) 3 December 28th 04 07:39 PM
Charting data ranges that change mikelee101 Charts and Charting in Excel 2 December 16th 04 11:07 PM
I need a macro to find cut and paste data to new cell Rex Excel Discussion (Misc queries) 0 December 6th 04 12:45 AM
I need a macro to find cut and paste data to new cell Rex Excel Discussion (Misc queries) 0 December 6th 04 12:23 AM


All times are GMT +1. The time now is 03:44 AM.

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"