View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gary[_14_] Gary[_14_] is offline
external usenet poster
 
Posts: 1
Default Creating a Range object in .Net

How do I programatically define a range?

I writing information to the upper left of a rectangle at
cell "A4" and a range defined as:

xlRange = xlSheet.Range("A4")

Next I add information to cells by moving to the right
one cell, until I am done a 'row' of data. Then I go
back to the "A" column, row+1 and add data to more cells
as follows:

for i = 0 to 10
for j = 0 to 10
xlRange.Offset(i, j) = i.tostring() + ", " +
j.tostring
next j
next i


Once I am finished, I want to format the 'range' of cells
I jusst worked on using a statement something like (this
is where I need help)

myRange.SetRange (xlRange, xlRange.offset(i,j))
'myRange is ("A4:K11")

* Office XP Professional
* Windows XP Professional
* .Net v. 1.1

Gary