Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Range in Macro error

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro error, range object need data? Daniel Charts and Charting in Excel 1 June 15th 07 11:27 AM
Range in Macro error Charles Chickering Excel Programming 0 March 28th 07 12:07 AM
fix a macro that gets a run-time error '9' subscript out of range kellys Excel Programming 1 March 9th 06 07:51 PM
Excel macro - Range & Sheet name error sjohns34 Excel Programming 1 June 16th 04 07:10 PM
Excel Macro Problem, Add-in need to work in every workbook & Error:9 Subscript out of range Burak[_2_] Excel Programming 1 October 31st 03 08:09 PM


All times are GMT +1. The time now is 03:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"