Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Move the cursor to a cell in button click event

I have a button would like to do the followings:
User click the button, I want to make a cell to be selected(make it focused)
in a row which is the last row. This last row is not the last row of the
worksheet but the last row of the column who has no value ?

For example:

A B C
Peter 25 11:35pm
John 33 12pm
Mary 23 1:22am

So if the user click the button, the cell A4 should be selected. I want to
simulate as a new record function.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Move the cursor to a cell in button click event

Range("A" & Rows.Count).End(xlUp).Offset(1).Select

--

Vasant

"Man Utd" wrote in message
...
I have a button would like to do the followings:
User click the button, I want to make a cell to be selected(make it

focused)
in a row which is the last row. This last row is not the last row of the
worksheet but the last row of the column who has no value ?

For example:

A B C
Peter 25 11:35pm
John 33 12pm
Mary 23 1:22am

So if the user click the button, the cell A4 should be selected. I want to
simulate as a new record function.





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Move the cursor to a cell in button click event

Thank you for your reply.
I tried, it seems have strange behaviour to my case:

I have defined 100 rows in which 2 columns have formula inside, and their
contents are empty. When I run this code, the cell selected is the cell
A101but not A1.


Range("A" & Rows.Count).End(xlUp).Offset(1).Select



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
On click button event [email protected] Excel Worksheet Functions 1 November 30th 06 04:39 PM
I click on a cell and move the cursor the entire area highlights Pam Excel Discussion (Misc queries) 2 June 20th 05 10:22 PM
I click on a cell and move the cursor the entire area highlights . Pam Excel Discussion (Misc queries) 1 June 20th 05 07:30 PM
capture right mouse button click event on cell Reinhard Thomann Excel Programming 0 January 20th 05 11:41 AM
move the cursor to a button Joachim Geschinsky Excel Programming 4 December 27th 03 09:47 AM


All times are GMT +1. The time now is 05:47 AM.

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"