Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
I included PASSBRIDGELib COM Object using Tools -> References
I wrote VB code as follows:
Dim PB_Manager As PASSBRIDGELib.manager
Dim PB_Serial As PASSBRIDGELib.com_serial
Sub PB_Send(ByVal y As Byte)
PB_Send = PB_Serial.send(y)
Private Sub cmdSend_Click() ' the name of command button is cmdSend
Dim lResult As Long
Dim index As Byte
upperLimit = UBound(y)
For index = 0 To upperLimit
Dim myVar As Byte
myVar = y(index)
lResult = PB_Serial.send(myVar)
'Passbridge COM Object
Private Sub Form_Load()
' Create COM Objects
Set PB_Manager = CreateObject("passbridge.manager")
Set PB_Serial = CreateObject("passbridge.com_serial")
When I try to compile the code and click on command button 'cmdSend' I get an error:
Function or interface marked as restricted, or the function uses an automation type not supported in Visual basic
The COM Object Passbridge has a member 'send' in class COM_VARIABLE.
When we view the object property using Object browser we get
Function send(newVal() As Byte) As Long
Member of PASSBRIDGELib.com_serial
'send' is a function to which we have to pass only byVal.
Please can you help me solve this bug?
0 · ·