|
-
Jan 26th, 2002, 12:33 AM
#1
Thread Starter
Lively Member
Syntax Problem plz Help!
Hi All,
I've recently made an active x control that has this function in it:
Public Function SetModemSettings(Baud As Integer, Parity As String, DataBit As Integer, StopBit As Integer)
MSComm1.Settings = (Baud) & "," & (Parity) & "," & (DataBit) & "," & (StopBit)
'Mscomm1.PortOpen = True
End Function
Ok, now the problem lies when I try to call it in my VB project...
Mod1.SetModemSettings(cmbbaud.Text, cmbparity.Text, cmbdatabit.Text, cmbstopbit.Text)
It thinks that this code is wrong and comes back with compile error Expected: =
Any help would be greatly appreciated!
Thanks.
Best Regards,
Smithy
-
Jan 26th, 2002, 12:39 AM
#2
Get rid of the ()'s and it should work
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Jan 26th, 2002, 12:43 AM
#3
Thread Starter
Lively Member
Thanks!
Just a quick question, there's quite a few ()'s which ones should I get rid of?
-
Jan 26th, 2002, 12:45 AM
#4
Originally posted by Smithy006
Thanks!
Just a quick question, there's quite a few ()'s which ones should I get rid of?
VB Code:
Mod1.SetModemSettings cmbbaud.Text, cmbparity.Text, cmbdatabit.Text, cmbstopbit.Text
The line that causes the problem should look like this.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Jan 26th, 2002, 12:45 AM
#5
Mod1.SetModemSettings cmbbaud.Text, cmbparity.Text, cmbdatabit.Text, cmbstopbit.Text
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|