Thread: Excel VBA-
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
waveracerr[_9_] waveracerr[_9_] is offline
external usenet poster
 
Posts: 1
Default Excel VBA-

Dim Rng as Range
Dim strName As Object
Set strName = Worksheets("12 15 03 07 KWSC1_1a").Range("O2")

How can I assign a variable to the range, rather than having the "02
cell reference? I've seen the following:

Dim Rng as Range
Dim myRange As Object
Set myRange = Worksheets("Sheet1").Range(Cells(1,1).Cells(10,5))

...as a way to use Cells and thus vary the column & row.

How can I set the range to something like:
Range(Cells(1,1))?

Thank

--
Message posted from http://www.ExcelForum.com