L
LuvMyTennis
I posted a question on the 18th "How do I move to a specified row and
insert a value?" and I was wondering if anyone knew how to solve it, my
outstanding issues are:
Help!!! I can't get this code to work, what am I doing wrong??
varRef = Target.Address
varVal = Target.Value
varRow = Me.Range(varRef).Row
varCol = Me.Range(varRef).Column
---- this works above this line ----------
' Q.(1) am I supposed to declare rng as a Range ?
Dim rng As Range
' Q.(2) how do I populate the range, like this?
rng = Target
'Q.(3) Is this how I do this for row 5 (and then I'll do the same for the
other row)?
If rng.Row = 5 Then Set rng = rng.Offset(3, 0)
I've tried numerous combinations and Excel keeps generating error messages.
I wonder if it is in relation to declaring 'rng' and/or then populating it,
and/or
then finally setting it to offset as above.
Please can anyone help with this issue?
insert a value?" and I was wondering if anyone knew how to solve it, my
outstanding issues are:
Help!!! I can't get this code to work, what am I doing wrong??
varRef = Target.Address
varVal = Target.Value
varRow = Me.Range(varRef).Row
varCol = Me.Range(varRef).Column
---- this works above this line ----------
' Q.(1) am I supposed to declare rng as a Range ?
Dim rng As Range
' Q.(2) how do I populate the range, like this?
rng = Target
'Q.(3) Is this how I do this for row 5 (and then I'll do the same for the
other row)?
If rng.Row = 5 Then Set rng = rng.Offset(3, 0)
I've tried numerous combinations and Excel keeps generating error messages.
I wonder if it is in relation to declaring 'rng' and/or then populating it,
and/or
then finally setting it to offset as above.
Please can anyone help with this issue?