Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Please help me with the macro for MS Excel

Posted on 2011-02-17
Medium Priority
Last Modified: 2012-05-11
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
Question by:rfedorov
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 33

Assisted Solution

jppinto earned 300 total points
ID: 34919442
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

Accepted Solution

jorgeandresserrano earned 1400 total points
ID: 34919485
Hi there! I hope this works for you:

Sub MyFunction()

    Dim ws As Worksheet
    Dim name As String
    name =
    'To prevent the ugly blinking
    Application.ScreenUpdating = False
    For Each ws In Worksheets
    Next ws
    Application.ScreenUpdating = True

End Sub

Assisted Solution

ragnarok89 earned 300 total points
ID: 34919504
Sub a1()
  For each sh in Thisworkbook.Sheets
  Next sh
end sub

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question