Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. -- Regards, Tom Ogilvy "New Learner" <New wrote in message ... 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? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ok, how are you defining the variable "Col"
Steve "New Learner" <New wrote in message ... 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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Nesting a sheet name reference within a cell reference??? | Excel Discussion (Misc queries) | |||
Changing sheet reference to cell reference | Excel Worksheet Functions | |||
absolute cell reference A spreadsheet cell reference that does no | Excel Discussion (Misc queries) | |||
problem with cell reference in =sum(offset(cell reference,x,y,z,a)). Want cell ref to be variable. | Excel Worksheet Functions | |||
Problem with =sum(offset(cell reference,w,x,y,z). I want cell reference to be variable | Excel Worksheet Functions |