Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range in Macro error
Try:
Cells(rng.Row, 1).Select -- Charles Chickering "A good example is twice the value of good advice." "rick_mc" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Discussion (Misc queries) | |||
Macro error, range object need data? | Charts and Charting in Excel | |||
fix a macro that gets a run-time error '9' subscript out of range | Excel Programming | |||
Excel macro - Range & Sheet name error | Excel Programming | |||
Excel Macro Problem, Add-in need to work in every workbook & Error:9 Subscript out of range | Excel Programming |