R
robs3131
Hi,
I am trying to set a variable named idrange to column D in a sheet - the
values in this column will vary (ie - values may go through row 54 but then
may be updated to have values through row 67, etc). I need to capture all
cells in column D that have values as each cell in column D that does have a
value will be evaluated in a subsequent equation in the code. I have not
been able to figure out how to set my variable to equal the range of column
D...below is that code I have - I get a "Runtime error '1004';" error with
this code - is it possible to do what I'm trying to do?
Sub purgepayment()
Dim payment
Dim opentranpay
Dim rownumpay As Integer
Dim idrange As Range
Dim payrange As Range
Dim y As Integer
Sheets("Member ID Report Master").Activate
Set idrange = Range(Columns("D
"))
I am trying to set a variable named idrange to column D in a sheet - the
values in this column will vary (ie - values may go through row 54 but then
may be updated to have values through row 67, etc). I need to capture all
cells in column D that have values as each cell in column D that does have a
value will be evaluated in a subsequent equation in the code. I have not
been able to figure out how to set my variable to equal the range of column
D...below is that code I have - I get a "Runtime error '1004';" error with
this code - is it possible to do what I'm trying to do?
Sub purgepayment()
Dim payment
Dim opentranpay
Dim rownumpay As Integer
Dim idrange As Range
Dim payrange As Range
Dim y As Integer
Sheets("Member ID Report Master").Activate
Set idrange = Range(Columns("D