Cell Reference

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

how to ensure cell reference created in macro is working correctly under
excel worksheet?

If Col <= 7 Then Range("X1").Select

when the arguement is less than 7, it should go to worksheet cell X1, but
end up in cell Y2. why?
 
if you open a brand new workbook and put in code like

Sub Tester1()
dim col as Long
col = 5
if col <= 7 then Range("X1").Select
End sub

then run it, you should end up in cell X1. If that isn't happening in your
current environment, then it is something besides that line of code
contributing to the problem.
 

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