Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vbscript find last cell row 2

Status
Not open for further replies.

kyriakos70

Programmer
Jul 24, 2008
87
GR
Hello,
Another question how can I find last cell with value row?

Kyriakos
 



Hi,

What application?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Code:
set xl = getobject(,"excel.application")
r = 1
Do until len(xl.cells(r, 1).value) = 0
     r = r + 1
Loop

'last data is on row r

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 



If it is Excel...
Code:
    MsgBox Cells.Find("*", Cells(Cells.Rows.Count, "A"), , , , xlPrevious).Row

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top