Share via

Open and Refresh All sheets using macros

Anonymous
2012-11-27T12:43:18+00:00

Hi i have a workbook with a particular sheet i want displayng whenever the work  book was launched.

i have these macros one is to open the sheet designated the other to refresh the data within the book.

rereshing data macro

Sub RefreshPivotTables()

   Application.ScreenUpdating = False

     ActiveWorkbook.RefreshAll

   Application.ScreenUpdating = False

 End Sub

opening sheet

Private Sub Workbook_Open()

     Me.Worksheets("HOME_PAGE").Select

 End Sub

How will these two work together instead of manualy reshing i intend to let it refresh just after the book was opened.

thanks for your time.

i will be hiden all my sheet tabs as well.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2012-11-27T13:14:10+00:00

Try

Private Sub Workbook_Open()

    Application.ScreenUpdating = False

    Me.RefreshAll

    Application.ScreenUpdating = True

    Me.Worksheets("HOME_PAGE").Select

    ActiveWindow.DisplayWorkbookTabs = False

End Sub

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2012-11-27T16:32:15+00:00

    Thanks a lot HansV

    Was this answer helpful?

    0 comments No comments