Writing Macro - How to get the cursor/Active Cell back to top of W

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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
 

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

Back
Top