Also with v1.36 for the excel "freaks"
BDM can act a a pipe server between an excel worksheet using commands or automatically act on a spreadsheet change sending instructions to BDM which on his turn translates these in BDM Alarms and/or EAX pins.
Simple example.
Simple example.
Inserted Code
Option Explicit
Private Const szPipeName = "\\.\pipe\BDMpipe"
Private Declare Function CallNamedPipe Lib "kernel32" Alias _
"CallNamedPipeA" ( _
ByVal lpNamedPipeName As String, _
ByVal lpInBuffer As String, _
ByVal nInBufferSize As Long, _
lpOutBuffer As Byte, _
ByVal nOutBufferSize As Long, _
lpBytesRead As Long, _
ByVal nTimeOut As Long) As Long
Private Declare Function WaitNamedPipe Lib "kernel32" Alias _
"WaitNamedPipeA" ( _
ByVal lpNamedPipeName As String, _
ByVal nTimeOut As Long) As Long
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Me.Range("B2")) Is Nothing Then
Dim res As Long, i As Long, cbRead As Long
Dim textInLength As Long, textInRead As Long, textOut As String, textIn As String
Dim textInArray() As Byte
textOut = Cells(2, 2)
textInLength = 100
ReDim textInArray(textInLength) As Byte
If WaitNamedPipe(szPipeName, 0) = 0 Then
Cells(3, 2) = "BDM not available"
Else
res = CallNamedPipe(szPipeName, textOut, Len(textOut) + 1, _
textInArray(0), textInLength, cbRead, 1000)
If res > 0 Then
textIn = ""
For i = 0 To cbRead - 1
textIn = textIn & Chr(textInArray(i))
Next i
Cells(3, 2) = textIn
Else
MsgBox "Error number " & Err.LastDllError & _
" attempting to call CallNamedPipe.", vbOKOnly
End If
End If
End If
End Sub info@metacharttools,com