You can just use Sheets(1).Range...
or Sheets("Sheet1").Range...
Take a look here for more details on referencing sheets in VBA...
Trying to reference another worksheet in active workbook
EDIT: Please don't take this as an argument against the other answers here. They are excellent answers for the OP (part of why I waited until one was accepted). I just think this is worth mentioning as a consideration.
I have personally adapted, come to appreciate, and would recommend the convention of avoiding with
statements whenever possible per the following sentiment...
Why doesn't C# have VB.NET's 'with' operator?
Many people, including the C# language designers, believe that 'with' often harms readability, and is more of a curse than a blessing. It is clearer to declare a local variable with a meaningful name, and use that variable to perform multiple operations on a single object, than it is to have a block with a sort of implicit context.
by @Jon Skeet
https://stackoverflow.com/a/4174826/3546415
The use of variable declaration would look something like this...
Dim S1 As Worksheet
Set S1 = Sheets("Sheet1")
S1.Range... blah blah
Of course, there are still situations where using with
does still make sense. Such as when a variable can't be defined or when setting a large number of properties, but I do agree that readability is generally enhanced when you don't have to worry about nesting and checking the top of your with
structure to see what .Range
is actually referring to. For a simple program this is hardly an issue, but it's worth keeping in mind for something more complicated.