Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default What am I missing here?

Using the following code

Dim RngDate As Range
Set RngDate = ThisWorkbook.Worksheets("Summary Report").Range("A" & i)
ThisWorkbook.Worksheets("Summary Report").Range(RngDate).Select

Fails at line 3 with the following error:

Application Defined or object defined error.

Can anyone help me please?

Thanks.

Nick
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default What am I missing here?

RngDate is already a range--you don't need to, er, you can't wrap it inside
range().

application.goto rngdate, scroll:=true 'false?

should be sufficient.


Nick Smith wrote:

Using the following code

Dim RngDate As Range
Set RngDate = ThisWorkbook.Worksheets("Summary Report").Range("A" & i)
ThisWorkbook.Worksheets("Summary Report").Range(RngDate).Select

Fails at line 3 with the following error:

Application Defined or object defined error.

Can anyone help me please?

Thanks.

Nick


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default What am I missing here?

RngDate.Select
should work
--
Gary''s Student


"Nick Smith" wrote:

Using the following code

Dim RngDate As Range
Set RngDate = ThisWorkbook.Worksheets("Summary Report").Range("A" & i)
ThisWorkbook.Worksheets("Summary Report").Range(RngDate).Select

Fails at line 3 with the following error:

Application Defined or object defined error.

Can anyone help me please?

Thanks.

Nick

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default What am I missing here?

You can't select a range of a range, if I'm making sense. I.E., you're
setting RngDate as a range, and then trying to use it in another range
statement. Either do (1) or (2)

1) simply select the range this way:
ThisWorkbook.Worksheets("Summary Report").Range("A" & i).Select

or 2) if cell "A?" has a valid range syntax in it e.g. "A1" contains the
string "B1"
ThisWorkbook.Worksheets("Summary Report").Range(Cells(i, "a").Value).Select


"Nick Smith" wrote:

Using the following code

Dim RngDate As Range
Set RngDate = ThisWorkbook.Worksheets("Summary Report").Range("A" & i)
ThisWorkbook.Worksheets("Summary Report").Range(RngDate).Select

Fails at line 3 with the following error:

Application Defined or object defined error.

Can anyone help me please?

Thanks.

Nick

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default What am I missing here?

Remember that you can only select a range on a worksheet that's active.

You may need:

thisworkbook.activate
worksheets("summary report").select
rngdate.select

if you don't use application.goto.



Nick Smith wrote:

Using the following code

Dim RngDate As Range
Set RngDate = ThisWorkbook.Worksheets("Summary Report").Range("A" & i)
ThisWorkbook.Worksheets("Summary Report").Range(RngDate).Select

Fails at line 3 with the following error:

Application Defined or object defined error.

Can anyone help me please?

Thanks.

Nick


--

Dave Peterson
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
#Missing Shirley Excel Worksheet Functions 1 August 28th 08 10:22 PM
What am I missing? keithb Excel Programming 2 February 21st 06 02:10 PM
Toolbars Missing, And option to Add Missing SmeetaG Excel Discussion (Misc queries) 3 October 19th 05 11:43 AM
On Error? Creates 1 missing worksheet then never detects any other missing worksheets Craigm[_35_] Excel Programming 2 August 1st 05 02:39 PM
is there something i'm missing? ben Excel Programming 0 January 17th 05 10:03 PM


All times are GMT +1. The time now is 02:05 PM.

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

About Us

"It's about Microsoft Excel"