Please help me with the macro for MS Excel

I have an excel book with several sheets, let say 3
i need help with macro to make sure when i run it
all cursors jump to A1 cell and stay there
rfedorovAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
jorgeandresserranoConnect With a Mentor Commented:
Hi there! I hope this works for you:

Sub MyFunction()

    Dim ws As Worksheet
    Dim name As String
   
    name = ActiveSheet.name
   
    'To prevent the ugly blinking
    Application.ScreenUpdating = False
   
    For Each ws In Worksheets
        ws.Activate
        ws.Range("A1").Select
    Next ws
   
    ThisWorkbook.Worksheets(name).Activate
   
    Application.ScreenUpdating = True

End Sub
0
 
jppintoConnect With a Mentor Commented:
Sub position_cursor()
Dim i As Integer
 For i = 1 To ActiveWorkbook.Sheets.Count
    ActiveWorkbook.Sheets(i).Cells(1, 1).Select
 Next i
End Sub
0
 
ragnarok89Connect With a Mentor Commented:
Sub a1()
  For each sh in Thisworkbook.Sheets
  sh.Range("A1").select
  Next sh
end sub
0
All Courses

From novice to tech pro — start learning today.