ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   range.activate (https://www.excelbanter.com/excel-programming/291205-range-activate.html)

Rune_Daub[_16_]

range.activate
 
A simple question.
When i press s userform commandbutton, I want it to activate the firs
empty cell in the A collumn..
But how??

I can figure out as much as range(xxxxx).activate... But how do I ge
it to recognise the first empty cell?

I have thought of a countv(A:A)+1

But I cant get it to work properly..

Rune Dau

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


Tom Ogilvy

range.activate
 
With worksheets("Sheet1")
.Activate
if isemtpy(.range("a1")) then
.range("a1").Activate
else
.cells(rows.count,1).End(xlup)(2).Activate
End if
End With

--
Regards,
Tom Ogilvy

"Rune_Daub " wrote in message
...
A simple question.
When i press s userform commandbutton, I want it to activate the first
empty cell in the A collumn..
But how??

I can figure out as much as range(xxxxx).activate... But how do I get
it to recognise the first empty cell?

I have thought of a countv(A:A)+1

But I cant get it to work properly..

Rune Daub


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





All times are GMT +1. The time now is 05:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com