Hello all,
I have this program where I look through all the rows in the excel file I use...
Cells(1, 1).Select
Set rngTPT = .Range("A1:A650")

but I dont want to have a range limitation. How can I go through the file but not give it a limitation?

I was trying .UsedRange.Value, but it kept giving me an error that the object variable or With block var not set...so I apparently am not using it correctly. Can anyone help?

Thanks.
pbe

max of 65536 rows in Excel so make it your max.

Hi,

You can use Range("A:A") and the whole col will be used.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.