Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Running Macro when value in spreadsheet is true

When you have alot of links in a spreadsheet executing code based on
events can be problematic.

You would be better of running a routine based on time.

'This should be placed in the ThisWorkbook Module
Private Sub Workbook_Open()

Call Scan

End Sub

'Regular code module
Public Sub Scan()

'Every second evaluate Links to see if they have changed
RunWhen = Now + TimeSerial(0, 0, 1)
Application.OnTime earliesttime:=RunWhen, procedu="Scan", _
schedule:=True

End Sub



Jonas wrote in message ...
Is there a way to run a VBA macro each time that a value in the active
worksheet resolves as true etc?

Maybe there is a simpler way.

A machine process uses a DDE link to update values in a worksheet. Each
time that the value (or values) change, I want to add them to a
database.

Thanks for any help.

Jonas


---
Message posted from http://www.ExcelForum.com/

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
Search for TRUE in spreadsheet Paul Excel Discussion (Misc queries) 2 September 10th 08 01:22 PM
Running a Macro from a Spreadsheet Function Patrick (GVC) Excel Worksheet Functions 2 February 10th 08 12:30 PM
Prevent A Macro From Running If SpreadSheet is Filtered carl Excel Worksheet Functions 1 June 22nd 05 04:04 PM
If "true" run a Macro Rod Excel Worksheet Functions 4 March 17th 05 08:14 PM
Launch Macro in Access via Macro running in Excel??? dgrant Excel Programming 1 September 24th 03 01:38 PM


All times are GMT +1. The time now is 01:45 AM.

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"