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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find next available excel cell

Status
Not open for further replies.

philipad

Technical User
Feb 12, 2006
23
CY
Hi all,

I am writing a program which will enter some values in an excel worksheet in column A. This file will already
have some values entered in the first cells.

I want the VB program to check in which cell is the last value entered, so ti will write to the next available cell.
How can I do that?

Thanks.
 



Hi,

Are you coding this in Excel VBA or using VB 5 or 6?

Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 


Code:
With xlApp.Sheets(1)
  LastRow = .Cells(.Cells.Rows.Count, "A").End(xlUP).Row
End With

Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top