R
rick_mc
I have a declared RANGE object. I checked the contents of rng.Row and it is
correct, but I can't seem to use it in the following code. I have this error:
Runtime Error - 1004
Method 'Range' of object '_global" failed
Dim rng As Range
Set rng = Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)
Sheets("RAWDATA").Visible = True
Sheets("RAWDATA").Select
Range("A2").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Selection.Copy
Sheets("Data").Select
Range(rng.Row, 1).Select
correct, but I can't seem to use it in the following code. I have this error:
Runtime Error - 1004
Method 'Range' of object '_global" failed
Dim rng As Range
Set rng = Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)
Sheets("RAWDATA").Visible = True
Sheets("RAWDATA").Select
Range("A2").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Selection.Copy
Sheets("Data").Select
Range(rng.Row, 1).Select