View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
emge[_2_] emge[_2_] is offline
external usenet poster
 
Posts: 1
Default Worksheet Change event and Links?

Hi, from what i've read what i have should work. Can anyone tell me
what i'm doing wrong?

I have a workbook that has one piece of data in it. In cell A2 i have
a Link to a server [=OPCLINK|Test!'rpr:data address'] to pull a binary
bit which toggles roughly every half hour or so. I want to use this as
a trigger. When this bit goes to a one I want it to open another
workbook, run some macros to update the data there then save with the
current date and time. If I go to Cell A2 and type '1' and hit enter
everything works just fine. But if the link updates and A2 goes to a
one, I get nothing. I've tried a few different things like adding a
calculation to the sheet adding 0 to A2 to see if I could get it to
fire off of a calculation chage. But still , nothing.

Here is the code:


Code:
--------------------
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim myval As Integer
myval = Sheets("Trigger").Range("A2").Value2
If myval = 1 Then
Workbooks.Open blah blah
Application.OnTime blah blah
Application.OnTime blah blah
Application.OnTime blah blah
Else
End If
End Sub
--------------------


If anyone could help me out here it would be greatly appreciated. I've
been working on this a while now and its starting to drive me mad.
Heh.

Thanks for any replies,
Mike



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/