Thread: usedRange
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_5_] Dave Peterson[_5_] is offline
external usenet poster
 
Posts: 1,758
Default usedRange

Excel remembers the last cell you used.

You can reset it to what you want by using techniques (manual or code) at Debra
Dalgleish's site:

http://www.contextures.com/xlfaqApp.html#Unused


GC wrote:

Hi,

I am trying to access excel files from Access. I am using the
UsedRange.Columns.count command to get the number of columns with data, but I
get a wrong number: 7 while I have only 3 columns.
Any ideas why this should happen and how to correct it?

Thanks is advance,
GC


--

Dave Peterson