Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Unable to get last filled cell address from Range.End(xlDown) method


The scenario is like this. I have one .Xla file which has a functio
called generateReport(). This function will retrieve the data fro
Database and display in excel sheet.

Multiple Queried will be executed by generateReport(). I need to kno
the last filled Row cell so that I can start next value form the nex
row. For this purpose I have used Range.End(xlDown) method to know th
last filled cell. But while debugging I found that xldown value i
-4121 and this method will return last row cell address. i.e. $A$65536
so if I tried to move to next row (Set Range.Offset(2, 0)) then runtim
error will be displayed. Who to resolve this problem? Is there is an
other method to get last filled cell address?

This .Xla file function will be called from VB application.

Thanks
Ve

--
vedpate
-----------------------------------------------------------------------
vedpatel's Profile: http://www.excelforum.com/member.php...fo&userid=3198
View this thread: http://www.excelforum.com/showthread.php?threadid=51720

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Unable to get last filled cell address from Range.End(xlDown) method

See other post.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"vedpatel" wrote in
message ...

The scenario is like this. I have one .Xla file which has a function
called generateReport(). This function will retrieve the data from
Database and display in excel sheet.

Multiple Queried will be executed by generateReport(). I need to know
the last filled Row cell so that I can start next value form the next
row. For this purpose I have used Range.End(xlDown) method to know the
last filled cell. But while debugging I found that xldown value is
-4121 and this method will return last row cell address. i.e. $A$65536.
so if I tried to move to next row (Set Range.Offset(2, 0)) then runtime
error will be displayed. Who to resolve this problem? Is there is any
other method to get last filled cell address?

This .Xla file function will be called from VB application.

Thanks
Ved


--
vedpatel
------------------------------------------------------------------------
vedpatel's Profile:

http://www.excelforum.com/member.php...o&userid=31987
View this thread: http://www.excelforum.com/showthread...hreadid=517209



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use xldown to select a range of cells merry_fay Excel Discussion (Misc queries) 3 May 26th 09 05:54 PM
The last filled cell in a range The Narcissist Excel Discussion (Misc queries) 6 February 8th 08 04:17 AM
Count filled colour in cell in given range [email protected] Excel Discussion (Misc queries) 2 May 16th 06 10:18 AM
Unable to use Range.End(xlDown) method vedpatel Excel Programming 6 March 1st 06 04:18 AM
Select the next row after xldown range ExcelMonkey[_108_] Excel Programming 2 March 5th 04 10:03 PM


All times are GMT +1. The time now is 06:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"