I have a macro that opens a file and then based on specified fields in the header (row 1) executes another macro. This one particular macro has 4 files that use it and one of those files only has two rows, the header and a row with data. For this particular file when
is executed, it selects the data in row 2 and all the way down to the last row in the worksheet. This causes issues in a later macro in that I loop through all the values in the range and return another value. Thing is, it not only does it for the cell with data, but also for all the other cells from row3 down to 65536.
What is the best way to keep this from happening?
Thanks
Code:
Windows(LoadName).Activate
Range("I2").Select
is executed, it selects the data in row 2 and all the way down to the last row in the worksheet. This causes issues in a later macro in that I loop through all the values in the range and return another value. Thing is, it not only does it for the cell with data, but also for all the other cells from row3 down to 65536.
What is the best way to keep this from happening?
Thanks