Defining a variable within a sub...

  • Thread starter Thread starter aking1987
  • Start date Start date
A

aking1987

Is it possible to define a variable, say "cellalphanumber" as "D" a
part of the ELSE within an if then else statement.

So if its ELSE it will define cellalphanumber = D

Can this definition be used within another sub
 
aking1987,
Do you mean:
Dim cellalphanumber As String
If SomeCondition=True Then
cellalphanumber = "Something Else"
Else
cellalphanumber = "D"
End If

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top