Consulting

Results 1 to 2 of 2

Thread: Private Sub Workbook_Open() and links

  1. #1
    VBAX Tutor
    Joined
    Jun 2012
    Posts
    240
    Location

    Private Sub Workbook_Open() and links

    I have looked at many posts relating to this and could not get any clarity, please help:


    I want to open a workbook manually, not from another workbook.
    When I open the workbook I do no want the question whether to update links displayed.
    After I worked with the workbook I want to update the links to data in another workbook. This will be done by activating a macro with a button on one of the sheets. Only than must the links be updated.

    I am not sure how to do this, could you please give some guidance?

    Also see the comments below.


    Private Sub Workbook_Open()

    'Does the following line merely "switch off" the question, or does it prevent auto updating links
    'as well?
    Application.AskToUpdateLinks = False

    'Not sure if the next line is necessary and exactly what it causes. I.e. can I still update links?
    ThisWorkbook.UpdateLinks = xlUpdateLinksNever
    End Sub

  2. #2
    VBAX Tutor
    Joined
    Jun 2012
    Posts
    240
    Location
    Private Sub Workbook_Open()
       
      'Does the following line merely "switch off" the question, or does it prevent auto updating links
      'as well?
      Application.AskToUpdateLinks = False
       
      'Not sure if the next line is necessary and exactly what it causes. I.e. can I still update links?
      ThisWorkbook.UpdateLinks = xlUpdateLinksNever
      End Sub

Posting Permissions

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