Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
#Missing | Excel Worksheet Functions | |||
What am I missing? | Excel Programming | |||
Toolbars Missing, And option to Add Missing | Excel Discussion (Misc queries) | |||
On Error? Creates 1 missing worksheet then never detects any other missing worksheets | Excel Programming | |||
is there something i'm missing? | Excel Programming |