GoToEnd Macro

  • Thread starter Thread starter Phil H
  • Start date Start date
P

Phil H

I need the screen to show the last row of data, with cell A of that row
selected - but this macro isn't doing it. Can someone help?

Sub GoToEnd()
Application.ScreenUpdating = False
ActiveCell.SpecialCells(xlLastCell).Select
ActiveWindow.ScrollColumn = 1
Application.ScreenUpdating = True
End Sub
 
The screen updating being off is one issue. The scroll does nothing with
this off

try something like this

Sub GoToEnd()
Application.ScreenUpdating = False
ActiveCell.SpecialCells(xlLastCell).Select
r=activecell.row
Application.ScreenUpdating = True
Cells(r,1).select
ActiveWindow.ScrollColumn = 1

End Sub
 
Hi

Try this:

Sub GoToEnd()
Application.ScreenUpdating = False
Cells(ActiveCell.SpecialCells(xlLastCell).Row, 1).Select
ActiveWindow.ScrollColumn = 1
Application.ScreenUpdating = True
End Sub

Regards,
Per
 
Paul, I inserted Dim r as Interger and it works (form another macro). Thanks
for the help. Phil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Run two macros for two different sheets 11
=today() - 1 4
Workbook_BeforeSave 8
Run macro on all files in a specific folder 3
Data samples 3
Clean up code 3
Combine 3 Macros 4
Excel VBA help: Text file formatting 19

Back
Top