Using Parameters in Macros

  • Thread starter Thread starter lj
  • Start date Start date
L

lj

Is it possible to get the following statement to work? I want to
be able to name a parameter in Visual Basic and then use the parameter
to reference a specific cell in the spreadsheet when the macro is run,
haven't been able to get this to work so far, any suggestions?


Sub Macro2()


Red = 2
If Range("B"Red) <> "" Then
Worksheets.Add.Move]

Endsub
 

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