Re: Vb to Excel range issues

Giganews Newsgroups
Subject: Re: Vb to Excel range issues
Posted by:  Dave Peterson (peters…
Date: Thu, 24 Jul 2008

How do you determine the topleft corner and the bottom right corner?

If it always starts in C33 and you can pick out a column and row to determine
where it should stop, then maybe...

Dim LastRow as long
dim LastCol as long
dim oResizeRange as range

with ows
  lastrow = .cells(.rows.count,"A").end(xlup).row
  lastcol = .cells(32,.columns.count).end(xltoleft).column
  set oresizerange = .range("c33",.cells(lastrow,lastcol))
end with

In this case, I used column A to determine the last row and row 32 to determine
the last column.

cmdolcet69 wrote:
> Im havening an issue with my range function in
> I have the following: OResizeRange = ows.range ("C33", "IR46")
> Where the problem lies is that its not always ending at IR46 it
> sometimes can be ending larger or smaller how can i factor the range
> based off the size of collected data in my vb program


Dave Peterson



In response to

Vb to Excel range issues posted by cmdolcet69 on Thu, 24 Jul 2008