Private
Sub
CommandButton1_Click()
Call
Excel.Application.Run(
"OPCS7200ExcelAddin.XLA!OPCWrite"
,
"1,V800.1,BOOL,RW"
, 1,
""
)
Call
Excel.Application.Run(
"OPCS7200ExcelAddin.XLA!OPCWrite"
,
"1,V800.1,BOOL,RW"
, 0,
""
)
End
Sub
Private
Sub
Worksheet_Calculate()
If
[a15] = 0
Then
CommandButton1.Visible =
False
Else
CommandButton1.Visible =
True
Dim
objDataObject
As
DataObject
Set
objDataObject =
New
DataObject
objDataObject.SetText Range(
"A2"
).Text
objDataObject.PutInClipboard
End
If
End
Sub
Private
Sub
CommandButton2_Click()
Call
Excel.Application.Run(
"OPCS7200ExcelAddin.XLA!OPCWrite"
,
"1,V800.6,BOOL,RW"
, 0,
""
)
End
Sub
Private
Sub
CommandButton3_Click()
Call
Excel.Application.Run(
"OPCS7200ExcelAddin.XLA!OPCWrite"
,
"1,V800.7,BOOL,RW"
, 1,
""
)
Call
Excel.Application.Run(
"OPCS7200ExcelAddin.XLA!OPCWrite"
,
"1,V800.6,BOOL,RW"
, 1,
""
)
End
Sub