goodwin57
07-05-2008, 09:48 AM
How would you go about setting a variable to be a cell address? At the moment I'm trying to use:
Dim MyCell as Range
Set MyCell = Range(Target.Address(True,True,x1R1C1,False))
RowIndex=MyCell.Row
This gives me a run time error 1004. Method 'Range' of object'_Worksheet' failed. Any suggestions on how to fix this?
Also, the last line should store RowIndex as the row number the target cell is on - but seems to not work (I've made a cell based on its value and the value isn't correct).
Thank you for any help,
Simon
Dim MyCell as Range
Set MyCell = Range(Target.Address(True,True,x1R1C1,False))
RowIndex=MyCell.Row
This gives me a run time error 1004. Method 'Range' of object'_Worksheet' failed. Any suggestions on how to fix this?
Also, the last line should store RowIndex as the row number the target cell is on - but seems to not work (I've made a cell based on its value and the value isn't correct).
Thank you for any help,
Simon