Unmotiv8d
04-15-2008, 06:34 AM
I'm having a problem getting a macro to run from a value generated from an OPC link into a PLC program. The OPC link will display a number of either 0 or 1. The macro will run when I manually populate the cell with a 1 but not when the value is coming from the OPC link. Below is the script I'm using to call the macro along with a sample of the OPC link that I'm using. The value of the cell is being displayed as a simple number. Any help I could get would be greatly appreciated.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Range("check").Address Then
If Target = 1 Then
Call VerSaveAs
End If
If Target = 1 Then
Call Emailer("Team Ripsaw Report", "Team Ripsaw Report", ActiveWorkbook.FullName)
End If
End If
End Sub
MS Excel 2000 SR1
OPC Link {=RSLINX|piron!'T40:19.TT,L1,C1'}
Thanks Again
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Range("check").Address Then
If Target = 1 Then
Call VerSaveAs
End If
If Target = 1 Then
Call Emailer("Team Ripsaw Report", "Team Ripsaw Report", ActiveWorkbook.FullName)
End If
End If
End Sub
MS Excel 2000 SR1
OPC Link {=RSLINX|piron!'T40:19.TT,L1,C1'}
Thanks Again