Reputation: 1350
Is there a way to create about 100 IF statements like the one below in bulk rather than individually typing each one out with a different value in place of "string". I sometimes use excel to create code but I don't know how to do a line break in a function.
Will IF statements work on a single line, because then excel could be a possibility.
Any help will be much appreciated!
if dbread("column").ToString = "string" then
...
else
...
end if
if dbread("column").ToString = "string2" then
...
else
...
end if
Upvotes: 0
Views: 134
Reputation: 401
best do a select case.
select dbread("column").tostring
case "string"
''do stuff
case "string2"
''do stuff
case else
''do your else code here
end select
Upvotes: 2