Question end of statement error

suryatiakz

Member
Joined
Oct 2, 2010
Messages
7
Programming Experience
Beginner
help please, im getting this error
bold one is the error
this is my code

if radiohour.checked = true then
amount.text = val(hourtxt.text * hourinput.text)

else
radioday.checked = true then < end of statement error
amount.text = val(daytxt.text * hourinput.text)

elseif < must be preceded by a matching 'if' or 'elseif' error
radiomonth.checked = true then < end of statement error
amount.text = val(monthtxt.text * hourinput.text)

end if
 
First, please use code tags when posting code. It makes the post alot easier to read.

As to your question, your else should be an elseif like this:
VB.NET:
if radiohour.checked = true then
   amount.text = val(hourtxt.text * hourinput.text)
elseif radioday.checked = true then
   amount.text = val(daytxt.text * hourinput.text)
elseif radiomonth.checked = true then
   amount.text = val(monthtxt.text * hourinput.text)
end if
 
Back
Top