Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Writing Macro - How to get the cursor/Active Cell back to top of W

I'm creating a macro that's a basic zero out of all unprotected cells.
However, I want the macro to return the active cell/window view back to the
top of the sheet once the macro is finished running. What is the command I
put at the end of the macro? Currently, I have this:

Private Sub CommandButton3_Click()

Application.ScreenUpdating = False
ActiveCell.FormulaR1C1 = "0"
Range("K109").Select
ActiveCell.FormulaR1C1 = "0"
Range("K126").Select

End Sub

Thanks! Michele S.
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default Writing Macro - How to get the cursor/Active Cell back to top of W

Why not just Range("cellattop").Select? ("cellattop" is of course whichever
cell you mean when you say "top of the sheet" = K1, A1, or other)

Ed

"Michele.Nextel" wrote in message
...
I'm creating a macro that's a basic zero out of all unprotected cells.
However, I want the macro to return the active cell/window view back to

the
top of the sheet once the macro is finished running. What is the command

I
put at the end of the macro? Currently, I have this:

Private Sub CommandButton3_Click()

Application.ScreenUpdating = False
ActiveCell.FormulaR1C1 = "0"
Range("K109").Select
ActiveCell.FormulaR1C1 = "0"
Range("K126").Select

End Sub

Thanks! Michele S.



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
Cell formula that will give back the address of the cursor? Byron Excel Worksheet Functions 1 February 25th 10 03:04 AM
How do I make it so that the active cell follows the cursor keys? jmitchener Excel Discussion (Misc queries) 2 September 10th 06 06:07 PM
How do I move cursor in an active cell without using delete/backsp Sam Excel Discussion (Misc queries) 2 May 29th 06 02:39 AM
Cursor keys move active cell or scroll screen, how do I select whi Rob Croft Excel Discussion (Misc queries) 1 June 18th 05 11:51 PM
Writing a macro to bring back distinct value Sean[_7_] Excel Programming 2 May 24th 04 01:14 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"