LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
ade ade is offline
external usenet poster
 
Posts: 16
Default Problem with Worksheets v Ranges 'Again'

I seem to have a lot of difficulty using / selecting ranges that i have
defined on different Worksheets. I have read that you need to explictly
define the range which I often try to do - with usually poor results as I
always get the syntax wrong.
My current problem occurs in the following code module :-

Dim Range1 As Range
Dim Range2 As Range
Dim StartRange1 As Integer
Dim EndRange1 As Integer
Dim StartRange2 As Integer
Dim EndRange2 As Integer
Const RangeSize As Integer = 55


Sub Init()
StartRange1 = 3
EndRange1 = 57
StartRange2 = 2
EndRange2 = 56
Set Range1 = Range("A" & StartRange1 & ":" & "A" & EndRange1)
Set Range2 = Worksheets("ColumnSplits").Range("A" & StartRange2 & ":" &
"A" & EndRange2)
Range1.Select
With Worksheets("ColumnSplits")
.Range2.Select
End With

End Sub

Error : 'Object does not support this property or method' at the line near
the bottom '.Range2.Select'.

Anyone who can suugest the correct code to Select Range2? Also is there any
usefull methods for figuring out which code syntax you have to use when
working with ranges on different Worksheets as it never seems obvious to me,
for example in my code I can not see why the line '.Range2.Select' will not
work, it seems like the obvious solution to me.

Cheers
 
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
Ranges spanning worksheets RD Wirr Excel Worksheet Functions 0 November 22nd 06 07:04 AM
Copying Name Ranges along with Worksheets cratediggah[_2_] Excel Programming 1 August 16th 06 05:49 PM
worksheets and ranges David Gerstman Excel Programming 2 August 7th 06 09:57 PM
Worksheets, Ranges & Unknowns Alex Excel Programming 0 December 8th 04 10:47 PM
Comparing Ranges in two worksheets JeffFinnan Excel Programming 4 January 6th 04 11:30 PM


All times are GMT +1. The time now is 12:43 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"