Hi Folks,
I am having some problems with a range object that I created. I am trying to assign a set of values from an array to this range object. Before assigning these values, I increment iRowCount by one to move the range one row lower in the spreadsheet. When I use the following code with the Select statement, it works fine:
Worksheets("EvtData").Select
Set EvtCurrentRow = Range(Cells(iRowCount, 1), Cells(iRowCount, EvtCols))
So here is the problem. Since the EvtData sheet may be “very hidden”, I cannot use the Select statement. I tried doing it as shown below, however I get a Runtime Error 1004 “Application-defined or object-defined error”.
Set EvtCurrentRow = Worksheets("EvtData").Range(Cells(iRowCount, 1), Cells(iRowCount, EvtCols))
Does anyone know how to get around this? Many thanks for your help.
I am having some problems with a range object that I created. I am trying to assign a set of values from an array to this range object. Before assigning these values, I increment iRowCount by one to move the range one row lower in the spreadsheet. When I use the following code with the Select statement, it works fine:
Worksheets("EvtData").Select
Set EvtCurrentRow = Range(Cells(iRowCount, 1), Cells(iRowCount, EvtCols))
So here is the problem. Since the EvtData sheet may be “very hidden”, I cannot use the Select statement. I tried doing it as shown below, however I get a Runtime Error 1004 “Application-defined or object-defined error”.
Set EvtCurrentRow = Worksheets("EvtData").Range(Cells(iRowCount, 1), Cells(iRowCount, EvtCols))
Does anyone know how to get around this? Many thanks for your help.