View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Macro that moves to a cell using two variables See below

Rows is a reserved word. Try using a different name for your varaible like
lngRows (assuming you have declared the varaible as type Long).
--
HTH...

Jim Thomlinson


"Mathew" wrote:

Just when I think I know what I'm doing something like this comes along! I
have a macro that needs to move to a cell based on input from the user. The
vaiables are set and working. So What I need to do is set the active cell as
the Rows,Columnx. Can anyone help me with this.

I keep getting " Run Time Error 1004"
"Range' of object '_Global failed"
Here is the line:
Range(Rows, columnx).Select
Both the Rows and Columnx variables are working when I run the macros
step-by-step mode. Any help would be appreciated!