Hi,
I have a Sub with a large amount code but I'm stuck on one small section. There is a variable used in the code called DataValues.Count. In changing things around to change from a Function to a Sub, I somehow broke how this area of code was working.
The code below defines the input data range and works fine except for defining the variable named above. I've tried a dozen ways to define this variable and all return errors. Here is the code I am trying to use to define the variable DataValues.Count. The count is from I8 to the last used row in column I.
Any help with fixing my code is greatly appreciated.
Thanks,
Art
I have a Sub with a large amount code but I'm stuck on one small section. There is a variable used in the code called DataValues.Count. In changing things around to change from a Function to a Sub, I somehow broke how this area of code was working.
The code below defines the input data range and works fine except for defining the variable named above. I've tried a dozen ways to define this variable and all return errors. Here is the code I am trying to use to define the variable DataValues.Count. The count is from I8 to the last used row in column I.
Code:
EndRow = ActiveSheet.Range("I65536").End(xlUp).Row
Set curRange = ActiveSheet.Range("I8:I" & Format(EndRow))
DataValues.Count = ActiveSheet.Range("I8:I").End(xlDown).Rows.Count
Thanks,
Art