Results 1 to 1 of 1

Opening, refreshing, saving, and closing a closed workbook

Threaded View

  1. #1
    Registered User
    Join Date
    02-28-2013
    Location
    Mobile, AL
    MS-Off Ver
    2010
    Posts
    12

    Opening, refreshing, saving, and closing a closed workbook

    I have a macro enables document that has links to a spreadsheet. I have written this code:
    Private Sub Workbook_Open()
    
         Application.ScreenUpdating = False
         Application.DisplayAlerts = False
         Workbooks.Open FileName:= _
             "G:\Daily Operations Report\Executive\Automated Reports.xlsx", Password:="executive"
         Workbooks("Automated Reports.xlsx").RefreshAll
         ActiveWorkbook.Save
         ActiveWorkbook.Close
         Application.ScreenUpdating = True
         Application.DisplayAlerts = True
    
    End Sub
    and it is not refreshing the information in the spreadsheet...what am I doing wrong? It Keeps saying that an object is required but where?
    Last edited by JBeaucaire; 03-18-2013 at 07:28 PM. Reason: Added code tags, as per forum rules. Don't forget!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1