Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default xlend syntax in VBA-guru help needed

I'm sending the cursor to row 65,536 in Col D. I then want to get Exce
to send the cursor to the last row of data in Col D effectively b
using "End Up" key strokes. In VBA I have to do this by using "xlend
but am unsure of the syntax. Once there, I need Excel to tell me th
row number so I can use this as my parameter in a DO While loop.

Can anyone help please

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default xlend syntax in VBA-guru help needed

lastrow = cells(rows.count,4).End(xlup).Row

You don't need to send the cursor anywhere. Just use a reference. It is
faster and more efficient.

--
Regards,
Tom Ogilvy


"Stuart Farr " wrote in message
...
I'm sending the cursor to row 65,536 in Col D. I then want to get Excel
to send the cursor to the last row of data in Col D effectively by
using "End Up" key strokes. In VBA I have to do this by using "xlend"
but am unsure of the syntax. Once there, I need Excel to tell me the
row number so I can use this as my parameter in a DO While loop.

Can anyone help please?


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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default xlend syntax in VBA-guru help needed

Range("D65536").End(xlUp).Select
MsgBox ActiveCell.Row

Regards.

"Stuart Farr " wrote in message
...
I'm sending the cursor to row 65,536 in Col D. I then want to get Excel
to send the cursor to the last row of data in Col D effectively by
using "End Up" key strokes. In VBA I have to do this by using "xlend"
but am unsure of the syntax. Once there, I need Excel to tell me the
row number so I can use this as my parameter in a DO While loop.

Can anyone help please?


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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.674 / Virus Database: 436 - Release Date: 02/05/2004


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default xlend syntax in VBA-guru help needed

Thanks a lot Tom, absolutely perfect

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

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
Excel Guru Needed For Formula C-Dog Excel Worksheet Functions 2 April 1st 08 08:26 PM
time guru needed [email protected] Excel Worksheet Functions 2 January 24th 08 01:12 PM
VBA code to sum a row: syntax needed [email protected] Excel Discussion (Misc queries) 1 July 11th 05 06:41 PM
Syntax needed for With count Excel Programming 4 April 6th 04 02:33 PM
VBA programming guru needed - HELP! Fredy Excel Programming 0 January 16th 04 08:26 PM


All times are GMT +1. The time now is 09:42 AM.

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

About Us

"It's about Microsoft Excel"