Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default GoToEnd Macro

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default GoToEnd Macro

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

--
If this helps, please remember to click yes.


"Phil H" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default GoToEnd Macro

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

"Phil H" skrev i meddelelsen
...
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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default GoToEnd Macro

Paul, Getting "variable not defined" error. Thanks, Phil

"Paul C" wrote:

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

--
If this helps, please remember to click yes.


"Phil H" wrote:

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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default GoToEnd Macro

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

"Paul C" wrote:

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

--
If this helps, please remember to click yes.


"Phil H" wrote:

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

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
AutoRun Macro with a delay to give user the choice to cancel the macro wanderlust Excel Programming 2 September 28th 07 04:09 PM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
Need syntax for RUNning a Word macro with an argument, called from an Excel macro Steve[_84_] Excel Programming 3 July 6th 06 07:42 PM
macro to delete entire rows when column A is blank ...a quick macro vikram Excel Programming 4 May 3rd 04 08:45 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


All times are GMT +1. The time now is 09:03 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"