mosley
03-21-2007, 08:28 AM
Hi I am a newbie, and have a question. I am messing around with creating forms and such (in Excel 2003). But while working with a function I get the following error:
Compile Error:
Expected: =
This is my code
Private Sub OptionButton1_Change()
If OptionButton1.Value = True Then
clearDetails 'this clears the textboxes in the form
getDetails (var1) 'this calls a function to get the details from a worksheet and populate various text boxes in my form. It passes one variable.
End If
End Sub
Function getDetails (temp1)
'this is the code that searches thru a worksheet for the "temp" value and places various values into textboxes in my form
End Function
This works fine. But now I want to pass two variables to the function. When I change the code to call the function to the following I get the above mentioned error:
getDetails (var1, var2) 'this calls a function to get the details from a worksheet that matches the value in textBox1
Thanks in advance.
Compile Error:
Expected: =
This is my code
Private Sub OptionButton1_Change()
If OptionButton1.Value = True Then
clearDetails 'this clears the textboxes in the form
getDetails (var1) 'this calls a function to get the details from a worksheet and populate various text boxes in my form. It passes one variable.
End If
End Sub
Function getDetails (temp1)
'this is the code that searches thru a worksheet for the "temp" value and places various values into textboxes in my form
End Function
This works fine. But now I want to pass two variables to the function. When I change the code to call the function to the following I get the above mentioned error:
getDetails (var1, var2) 'this calls a function to get the details from a worksheet that matches the value in textBox1
Thanks in advance.