Macro in VB to go to the last line

Solved
cassar1942 Posted messages 4 Status Membre -  
aquarelle Posted messages 7182 Registration date   Status Modérateur Last intervention   -
Bonjour,
I created a simple table in Excel to track my bank expenses and income. I already have a macro that selects this table from other sheets. However, I would like to add a way in this macro to position the cursor below the last row of this table for new entries instead of having to move down with the arrows. How can I write the macro in VB?
Thank you for your help, if possible.
Configuration: Windows XP Internet Explorer 6.0

3 réponses

aquarelle Posted messages 7182 Registration date   Status Modérateur Last intervention   1 311
 
Good evening,
Here is a macro to adapt if necessary:
Sub GoToEnd() LastCell = Range("A1").End(xlDown).Address Range(LastCell).Activate End Sub 

I hope this will be what you're looking for.
Have a good evening
--

"To find a solution to one's problems, one must make an effort."
4
cassar1942 Posted messages 4 Status Membre
 
Thank you very much, that works. I only changed the column number.
However, how do I tell him to alert not to the last filled line but to the next empty line for a new entry? It shouldn't be complicated, but for me, it is.
Best regards
0