+ Reply to Thread
Results 1 to 11 of 11

Startup prompt - Update links

  1. #1
    Horatio J. Bilge
    Guest

    Startup prompt - Update links

    I am trying to remove the startup prompt that asks if I want to update links
    to external workbooks (I want the links to update automatically for this
    workbook).

    I clicked on Edit -> Links...
    I clicked "Startup Prompt..."
    I selected "Don't display the alert and update links"
    I clicked OK, and closed the dialog box.

    When I try reopening the workbook, the prompt still comes up.



  2. #2
    Dave Peterson
    Guest

    Re: Startup prompt - Update links

    If you tell excel that you want to be asked before updating links, then excel
    will respect that setting:

    Tools|options|edit tab
    Uncheck "Ask to update automatic links"

    This is a user-by-user setting--not a workbook setting.

    "Horatio J. Bilge" wrote:
    >
    > I am trying to remove the startup prompt that asks if I want to update links
    > to external workbooks (I want the links to update automatically for this
    > workbook).
    >
    > I clicked on Edit -> Links...
    > I clicked "Startup Prompt..."
    > I selected "Don't display the alert and update links"
    > I clicked OK, and closed the dialog box.
    >
    > When I try reopening the workbook, the prompt still comes up.


    --

    Dave Peterson

  3. #3
    Horatio J. Bilge
    Guest

    Re: Startup prompt - Update links

    This is for a workbook that I will be sharing with others. I want to make
    sure that everyone's copy automatically updates the links, but I would like
    to minimize the number of clicks to open the file.

    Currently, they will have to click to enable macros, and then click to
    update the links. Some users may be worried by the wording of the update
    dialog box ("... links can be used to access and share confidential
    information without your permission..."), and won't update the links.

    If users have unchecked the box that you mentioned (Tools|options|edit tab),
    it's no problem. But for those that have that box checked, is there a way to
    skip the dialog box, and still update the links?

    Thanks,
    Horatio



    Can I force the
    "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    news:43C9A3DC.F6795659@verizonXSPAM.net...
    > If you tell excel that you want to be asked before updating links, then
    > excel
    > will respect that setting:
    >
    > Tools|options|edit tab
    > Uncheck "Ask to update automatic links"
    >
    > This is a user-by-user setting--not a workbook setting.
    >
    > "Horatio J. Bilge" wrote:
    >>
    >> I am trying to remove the startup prompt that asks if I want to update
    >> links
    >> to external workbooks (I want the links to update automatically for this
    >> workbook).
    >>
    >> I clicked on Edit -> Links...
    >> I clicked "Startup Prompt..."
    >> I selected "Don't display the alert and update links"
    >> I clicked OK, and closed the dialog box.
    >>
    >> When I try reopening the workbook, the prompt still comes up.

    >
    > --
    >
    > Dave Peterson




  4. #4
    Dave Peterson
    Guest

    Re: Startup prompt - Update links

    If you want more control:
    Try creating a dummy workbook whose only purpose is to open the original
    workbook with links updated:

    Kind of like:

    Option Explicit
    Sub auto_open()
    Workbooks.Open Filename:="c:\my documents\excel\book2.xls", UpdateLinks:=1
    ThisWorkbook.Close savechanges:=False
    End Sub

    Then your users can open the dummy workbook and the links will be refreshed.
    (read about that UpdateLinks argument in VBA's help.)

    ======
    You could even give the real workbook a password to open, but don't share it
    with the users. Put the password in that macro in the dummy workbook and the
    users will be forced to go through your open routine.

    "Horatio J. Bilge" wrote:
    >
    > This is for a workbook that I will be sharing with others. I want to make
    > sure that everyone's copy automatically updates the links, but I would like
    > to minimize the number of clicks to open the file.
    >
    > Currently, they will have to click to enable macros, and then click to
    > update the links. Some users may be worried by the wording of the update
    > dialog box ("... links can be used to access and share confidential
    > information without your permission..."), and won't update the links.
    >
    > If users have unchecked the box that you mentioned (Tools|options|edit tab),
    > it's no problem. But for those that have that box checked, is there a way to
    > skip the dialog box, and still update the links?
    >
    > Thanks,
    > Horatio
    >
    > Can I force the
    > "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    > news:43C9A3DC.F6795659@verizonXSPAM.net...
    > > If you tell excel that you want to be asked before updating links, then
    > > excel
    > > will respect that setting:
    > >
    > > Tools|options|edit tab
    > > Uncheck "Ask to update automatic links"
    > >
    > > This is a user-by-user setting--not a workbook setting.
    > >
    > > "Horatio J. Bilge" wrote:
    > >>
    > >> I am trying to remove the startup prompt that asks if I want to update
    > >> links
    > >> to external workbooks (I want the links to update automatically for this
    > >> workbook).
    > >>
    > >> I clicked on Edit -> Links...
    > >> I clicked "Startup Prompt..."
    > >> I selected "Don't display the alert and update links"
    > >> I clicked OK, and closed the dialog box.
    > >>
    > >> When I try reopening the workbook, the prompt still comes up.

    > >
    > > --
    > >
    > > Dave Peterson


    --

    Dave Peterson

  5. #5
    Horatio J. Bilge
    Guest

    Re: Startup prompt - Update links

    I had set this project aside for awhile, and I'm just getting back to it.

    I like the idea of using a dummy workbook, but it isn't working for me. Here
    is what I did:
    1. I created the dummy workbook in the same directory as the target file
    2. I went to "ThisWorkbook" in the Visual Basic Editor, and used the code
    you provided. I used just the filename of the target file, instead of the
    full path, since it was in the same directory. I saved and closed.
    3. I opened the dummy workbook. I got a macro warning, and clicked "Enable
    macros." The dummy workbook opened, and stayed open, and the target workbook
    did not open.
    4. I edited the code to use the full path to the target file, like you had
    in your code, but the result was the same.

    ~ Horatio


    "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    news:43CA6538.BAD7BFCD@verizonXSPAM.net...
    > If you want more control:
    > Try creating a dummy workbook whose only purpose is to open the original
    > workbook with links updated:
    >
    > Kind of like:
    >
    > Option Explicit
    > Sub auto_open()
    > Workbooks.Open Filename:="c:\my documents\excel\book2.xls",
    > UpdateLinks:=1
    > ThisWorkbook.Close savechanges:=False
    > End Sub
    >
    > Then your users can open the dummy workbook and the links will be
    > refreshed.
    > (read about that UpdateLinks argument in VBA's help.)
    >
    > ======
    > You could even give the real workbook a password to open, but don't share
    > it
    > with the users. Put the password in that macro in the dummy workbook and
    > the
    > users will be forced to go through your open routine.
    >
    > "Horatio J. Bilge" wrote:
    >>
    >> This is for a workbook that I will be sharing with others. I want to make
    >> sure that everyone's copy automatically updates the links, but I would
    >> like
    >> to minimize the number of clicks to open the file.
    >>
    >> Currently, they will have to click to enable macros, and then click to
    >> update the links. Some users may be worried by the wording of the update
    >> dialog box ("... links can be used to access and share confidential
    >> information without your permission..."), and won't update the links.
    >>
    >> If users have unchecked the box that you mentioned (Tools|options|edit
    >> tab),
    >> it's no problem. But for those that have that box checked, is there a way
    >> to
    >> skip the dialog box, and still update the links?
    >>
    >> Thanks,
    >> Horatio
    >>
    >> Can I force the
    >> "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    >> news:43C9A3DC.F6795659@verizonXSPAM.net...
    >> > If you tell excel that you want to be asked before updating links, then
    >> > excel
    >> > will respect that setting:
    >> >
    >> > Tools|options|edit tab
    >> > Uncheck "Ask to update automatic links"
    >> >
    >> > This is a user-by-user setting--not a workbook setting.
    >> >
    >> > "Horatio J. Bilge" wrote:
    >> >>
    >> >> I am trying to remove the startup prompt that asks if I want to update
    >> >> links
    >> >> to external workbooks (I want the links to update automatically for
    >> >> this
    >> >> workbook).
    >> >>
    >> >> I clicked on Edit -> Links...
    >> >> I clicked "Startup Prompt..."
    >> >> I selected "Don't display the alert and update links"
    >> >> I clicked OK, and closed the dialog box.
    >> >>
    >> >> When I try reopening the workbook, the prompt still comes up.
    >> >
    >> > --
    >> >
    >> > Dave Peterson

    >
    > --
    >
    > Dave Peterson




  6. #6
    Dave Peterson
    Guest

    Re: Startup prompt - Update links

    You have two choices...

    #1. Move the subroutine to a General module.
    #2. Change the name to Workbook_open.

    Auto_open in a general module and workbook_open in the ThisWorkbook module can
    accomplish the same sort of things--but you can't mix and match names and
    locations.

    Ps. I'd use the full path the workbook that you want to open. Else I think
    you'll find that excel wants to open a file of that name in the current
    directory (sometimes the default location).

    "Horatio J. Bilge" wrote:
    >
    > I had set this project aside for awhile, and I'm just getting back to it.
    >
    > I like the idea of using a dummy workbook, but it isn't working for me. Here
    > is what I did:
    > 1. I created the dummy workbook in the same directory as the target file
    > 2. I went to "ThisWorkbook" in the Visual Basic Editor, and used the code
    > you provided. I used just the filename of the target file, instead of the
    > full path, since it was in the same directory. I saved and closed.
    > 3. I opened the dummy workbook. I got a macro warning, and clicked "Enable
    > macros." The dummy workbook opened, and stayed open, and the target workbook
    > did not open.
    > 4. I edited the code to use the full path to the target file, like you had
    > in your code, but the result was the same.
    >
    > ~ Horatio
    >
    > "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    > news:43CA6538.BAD7BFCD@verizonXSPAM.net...
    > > If you want more control:
    > > Try creating a dummy workbook whose only purpose is to open the original
    > > workbook with links updated:
    > >
    > > Kind of like:
    > >
    > > Option Explicit
    > > Sub auto_open()
    > > Workbooks.Open Filename:="c:\my documents\excel\book2.xls",
    > > UpdateLinks:=1
    > > ThisWorkbook.Close savechanges:=False
    > > End Sub
    > >
    > > Then your users can open the dummy workbook and the links will be
    > > refreshed.
    > > (read about that UpdateLinks argument in VBA's help.)
    > >
    > > ======
    > > You could even give the real workbook a password to open, but don't share
    > > it
    > > with the users. Put the password in that macro in the dummy workbook and
    > > the
    > > users will be forced to go through your open routine.
    > >
    > > "Horatio J. Bilge" wrote:
    > >>
    > >> This is for a workbook that I will be sharing with others. I want to make
    > >> sure that everyone's copy automatically updates the links, but I would
    > >> like
    > >> to minimize the number of clicks to open the file.
    > >>
    > >> Currently, they will have to click to enable macros, and then click to
    > >> update the links. Some users may be worried by the wording of the update
    > >> dialog box ("... links can be used to access and share confidential
    > >> information without your permission..."), and won't update the links.
    > >>
    > >> If users have unchecked the box that you mentioned (Tools|options|edit
    > >> tab),
    > >> it's no problem. But for those that have that box checked, is there a way
    > >> to
    > >> skip the dialog box, and still update the links?
    > >>
    > >> Thanks,
    > >> Horatio
    > >>
    > >> Can I force the
    > >> "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    > >> news:43C9A3DC.F6795659@verizonXSPAM.net...
    > >> > If you tell excel that you want to be asked before updating links, then
    > >> > excel
    > >> > will respect that setting:
    > >> >
    > >> > Tools|options|edit tab
    > >> > Uncheck "Ask to update automatic links"
    > >> >
    > >> > This is a user-by-user setting--not a workbook setting.
    > >> >
    > >> > "Horatio J. Bilge" wrote:
    > >> >>
    > >> >> I am trying to remove the startup prompt that asks if I want to update
    > >> >> links
    > >> >> to external workbooks (I want the links to update automatically for
    > >> >> this
    > >> >> workbook).
    > >> >>
    > >> >> I clicked on Edit -> Links...
    > >> >> I clicked "Startup Prompt..."
    > >> >> I selected "Don't display the alert and update links"
    > >> >> I clicked OK, and closed the dialog box.
    > >> >>
    > >> >> When I try reopening the workbook, the prompt still comes up.
    > >> >
    > >> > --
    > >> >
    > >> > Dave Peterson

    > >
    > > --
    > >
    > > Dave Peterson


    --

    Dave Peterson

  7. #7
    Horatio J. Bilge
    Guest

    Re: Startup prompt - Update links

    Thanks.
    I wasn't certain what you meant by changing it to a general module, but I
    changed the name to workbook_open, and it works fine.

    Is there a way to use a relative file path, rather than the full path? Even
    if all users put the file in the same place, the full path is different for
    each user. For example, if everyone puts it in their My Documents folder,
    the full path on Windows XP would be:
    "C:\Documents and Settings\[User Name]\My Documents"

    Thanks,
    ~ Horatio

    "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    news:43EE1600.590D3F13@verizonXSPAM.net...
    > You have two choices...
    >
    > #1. Move the subroutine to a General module.
    > #2. Change the name to Workbook_open.
    >
    > Auto_open in a general module and workbook_open in the ThisWorkbook module
    > can
    > accomplish the same sort of things--but you can't mix and match names and
    > locations.
    >
    > Ps. I'd use the full path the workbook that you want to open. Else I
    > think
    > you'll find that excel wants to open a file of that name in the current
    > directory (sometimes the default location).
    >
    > "Horatio J. Bilge" wrote:
    >>
    >> I had set this project aside for awhile, and I'm just getting back to it.
    >>
    >> I like the idea of using a dummy workbook, but it isn't working for me.
    >> Here
    >> is what I did:
    >> 1. I created the dummy workbook in the same directory as the target file
    >> 2. I went to "ThisWorkbook" in the Visual Basic Editor, and used the code
    >> you provided. I used just the filename of the target file, instead of the
    >> full path, since it was in the same directory. I saved and closed.
    >> 3. I opened the dummy workbook. I got a macro warning, and clicked
    >> "Enable
    >> macros." The dummy workbook opened, and stayed open, and the target
    >> workbook
    >> did not open.
    >> 4. I edited the code to use the full path to the target file, like you
    >> had
    >> in your code, but the result was the same.
    >>
    >> ~ Horatio
    >>
    >> "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    >> news:43CA6538.BAD7BFCD@verizonXSPAM.net...
    >> > If you want more control:
    >> > Try creating a dummy workbook whose only purpose is to open the
    >> > original
    >> > workbook with links updated:
    >> >
    >> > Kind of like:
    >> >
    >> > Option Explicit
    >> > Sub auto_open()
    >> > Workbooks.Open Filename:="c:\my documents\excel\book2.xls",
    >> > UpdateLinks:=1
    >> > ThisWorkbook.Close savechanges:=False
    >> > End Sub
    >> >
    >> > Then your users can open the dummy workbook and the links will be
    >> > refreshed.
    >> > (read about that UpdateLinks argument in VBA's help.)
    >> >
    >> > ======
    >> > You could even give the real workbook a password to open, but don't
    >> > share
    >> > it
    >> > with the users. Put the password in that macro in the dummy workbook
    >> > and
    >> > the
    >> > users will be forced to go through your open routine.
    >> >
    >> > "Horatio J. Bilge" wrote:
    >> >>
    >> >> This is for a workbook that I will be sharing with others. I want to
    >> >> make
    >> >> sure that everyone's copy automatically updates the links, but I would
    >> >> like
    >> >> to minimize the number of clicks to open the file.
    >> >>
    >> >> Currently, they will have to click to enable macros, and then click to
    >> >> update the links. Some users may be worried by the wording of the
    >> >> update
    >> >> dialog box ("... links can be used to access and share confidential
    >> >> information without your permission..."), and won't update the links.
    >> >>
    >> >> If users have unchecked the box that you mentioned (Tools|options|edit
    >> >> tab),
    >> >> it's no problem. But for those that have that box checked, is there a
    >> >> way
    >> >> to
    >> >> skip the dialog box, and still update the links?
    >> >>
    >> >> Thanks,
    >> >> Horatio
    >> >>
    >> >> Can I force the
    >> >> "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    >> >> news:43C9A3DC.F6795659@verizonXSPAM.net...
    >> >> > If you tell excel that you want to be asked before updating links,
    >> >> > then
    >> >> > excel
    >> >> > will respect that setting:
    >> >> >
    >> >> > Tools|options|edit tab
    >> >> > Uncheck "Ask to update automatic links"
    >> >> >
    >> >> > This is a user-by-user setting--not a workbook setting.
    >> >> >
    >> >> > "Horatio J. Bilge" wrote:
    >> >> >>
    >> >> >> I am trying to remove the startup prompt that asks if I want to
    >> >> >> update
    >> >> >> links
    >> >> >> to external workbooks (I want the links to update automatically for
    >> >> >> this
    >> >> >> workbook).
    >> >> >>
    >> >> >> I clicked on Edit -> Links...
    >> >> >> I clicked "Startup Prompt..."
    >> >> >> I selected "Don't display the alert and update links"
    >> >> >> I clicked OK, and closed the dialog box.
    >> >> >>
    >> >> >> When I try reopening the workbook, the prompt still comes up.
    >> >> >
    >> >> > --
    >> >> >
    >> >> > Dave Peterson
    >> >
    >> > --
    >> >
    >> > Dave Peterson

    >
    > --
    >
    > Dave Peterson




  8. #8
    Dave Peterson
    Guest

    Re: Startup prompt - Update links

    A general module is inserted in the VBE via: Insert|module.

    It's not the ThisWorkbook and it's not behind a worksheet.

    You could just use that same folder as the workbook that owns the code:

    Workbooks.Open Filename:=thisworkbook.path & "\" & "book2.xls"





    "Horatio J. Bilge" wrote:
    >
    > Thanks.
    > I wasn't certain what you meant by changing it to a general module, but I
    > changed the name to workbook_open, and it works fine.
    >
    > Is there a way to use a relative file path, rather than the full path? Even
    > if all users put the file in the same place, the full path is different for
    > each user. For example, if everyone puts it in their My Documents folder,
    > the full path on Windows XP would be:
    > "C:\Documents and Settings\[User Name]\My Documents"
    >
    > Thanks,
    > ~ Horatio
    >
    > "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    > news:43EE1600.590D3F13@verizonXSPAM.net...
    > > You have two choices...
    > >
    > > #1. Move the subroutine to a General module.
    > > #2. Change the name to Workbook_open.
    > >
    > > Auto_open in a general module and workbook_open in the ThisWorkbook module
    > > can
    > > accomplish the same sort of things--but you can't mix and match names and
    > > locations.
    > >
    > > Ps. I'd use the full path the workbook that you want to open. Else I
    > > think
    > > you'll find that excel wants to open a file of that name in the current
    > > directory (sometimes the default location).
    > >
    > > "Horatio J. Bilge" wrote:
    > >>
    > >> I had set this project aside for awhile, and I'm just getting back to it.
    > >>
    > >> I like the idea of using a dummy workbook, but it isn't working for me.
    > >> Here
    > >> is what I did:
    > >> 1. I created the dummy workbook in the same directory as the target file
    > >> 2. I went to "ThisWorkbook" in the Visual Basic Editor, and used the code
    > >> you provided. I used just the filename of the target file, instead of the
    > >> full path, since it was in the same directory. I saved and closed.
    > >> 3. I opened the dummy workbook. I got a macro warning, and clicked
    > >> "Enable
    > >> macros." The dummy workbook opened, and stayed open, and the target
    > >> workbook
    > >> did not open.
    > >> 4. I edited the code to use the full path to the target file, like you
    > >> had
    > >> in your code, but the result was the same.
    > >>
    > >> ~ Horatio
    > >>
    > >> "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    > >> news:43CA6538.BAD7BFCD@verizonXSPAM.net...
    > >> > If you want more control:
    > >> > Try creating a dummy workbook whose only purpose is to open the
    > >> > original
    > >> > workbook with links updated:
    > >> >
    > >> > Kind of like:
    > >> >
    > >> > Option Explicit
    > >> > Sub auto_open()
    > >> > Workbooks.Open Filename:="c:\my documents\excel\book2.xls",
    > >> > UpdateLinks:=1
    > >> > ThisWorkbook.Close savechanges:=False
    > >> > End Sub
    > >> >
    > >> > Then your users can open the dummy workbook and the links will be
    > >> > refreshed.
    > >> > (read about that UpdateLinks argument in VBA's help.)
    > >> >
    > >> > ======
    > >> > You could even give the real workbook a password to open, but don't
    > >> > share
    > >> > it
    > >> > with the users. Put the password in that macro in the dummy workbook
    > >> > and
    > >> > the
    > >> > users will be forced to go through your open routine.
    > >> >
    > >> > "Horatio J. Bilge" wrote:
    > >> >>
    > >> >> This is for a workbook that I will be sharing with others. I want to
    > >> >> make
    > >> >> sure that everyone's copy automatically updates the links, but I would
    > >> >> like
    > >> >> to minimize the number of clicks to open the file.
    > >> >>
    > >> >> Currently, they will have to click to enable macros, and then click to
    > >> >> update the links. Some users may be worried by the wording of the
    > >> >> update
    > >> >> dialog box ("... links can be used to access and share confidential
    > >> >> information without your permission..."), and won't update the links.
    > >> >>
    > >> >> If users have unchecked the box that you mentioned (Tools|options|edit
    > >> >> tab),
    > >> >> it's no problem. But for those that have that box checked, is there a
    > >> >> way
    > >> >> to
    > >> >> skip the dialog box, and still update the links?
    > >> >>
    > >> >> Thanks,
    > >> >> Horatio
    > >> >>
    > >> >> Can I force the
    > >> >> "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    > >> >> news:43C9A3DC.F6795659@verizonXSPAM.net...
    > >> >> > If you tell excel that you want to be asked before updating links,
    > >> >> > then
    > >> >> > excel
    > >> >> > will respect that setting:
    > >> >> >
    > >> >> > Tools|options|edit tab
    > >> >> > Uncheck "Ask to update automatic links"
    > >> >> >
    > >> >> > This is a user-by-user setting--not a workbook setting.
    > >> >> >
    > >> >> > "Horatio J. Bilge" wrote:
    > >> >> >>
    > >> >> >> I am trying to remove the startup prompt that asks if I want to
    > >> >> >> update
    > >> >> >> links
    > >> >> >> to external workbooks (I want the links to update automatically for
    > >> >> >> this
    > >> >> >> workbook).
    > >> >> >>
    > >> >> >> I clicked on Edit -> Links...
    > >> >> >> I clicked "Startup Prompt..."
    > >> >> >> I selected "Don't display the alert and update links"
    > >> >> >> I clicked OK, and closed the dialog box.
    > >> >> >>
    > >> >> >> When I try reopening the workbook, the prompt still comes up.
    > >> >> >
    > >> >> > --
    > >> >> >
    > >> >> > Dave Peterson
    > >> >
    > >> > --
    > >> >
    > >> > Dave Peterson

    > >
    > > --
    > >
    > > Dave Peterson


    --

    Dave Peterson

  9. #9
    Horatio J. Bilge
    Guest

    Re: Startup prompt - Update links

    Dave,

    Thank you for your help. I've got it working well, now. Here is the final
    code I used in the dummy file:

    Option Explicit
    Sub workbook_open()
    Workbooks.Open Filename:=ThisWorkbook.Path & "\" & "book2.xls",
    UpdateLinks:=1, Password:="GreatPassword"
    ThisWorkbook.Close savechanges:=False
    End Sub

    Thanks again,
    ~ Horatio


    "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    news:43EE6254.D557687C@verizonXSPAM.net...
    >A general module is inserted in the VBE via: Insert|module.
    >
    > It's not the ThisWorkbook and it's not behind a worksheet.
    >
    > You could just use that same folder as the workbook that owns the code:
    >
    > Workbooks.Open Filename:=thisworkbook.path & "\" & "book2.xls"
    >
    >
    >
    >
    >
    > "Horatio J. Bilge" wrote:
    >>
    >> Thanks.
    >> I wasn't certain what you meant by changing it to a general module, but I
    >> changed the name to workbook_open, and it works fine.
    >>
    >> Is there a way to use a relative file path, rather than the full path?
    >> Even
    >> if all users put the file in the same place, the full path is different
    >> for
    >> each user. For example, if everyone puts it in their My Documents folder,
    >> the full path on Windows XP would be:
    >> "C:\Documents and Settings\[User Name]\My Documents"
    >>
    >> Thanks,
    >> ~ Horatio
    >>
    >> "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    >> news:43EE1600.590D3F13@verizonXSPAM.net...
    >> > You have two choices...
    >> >
    >> > #1. Move the subroutine to a General module.
    >> > #2. Change the name to Workbook_open.
    >> >
    >> > Auto_open in a general module and workbook_open in the ThisWorkbook
    >> > module
    >> > can
    >> > accomplish the same sort of things--but you can't mix and match names
    >> > and
    >> > locations.
    >> >
    >> > Ps. I'd use the full path the workbook that you want to open. Else I
    >> > think
    >> > you'll find that excel wants to open a file of that name in the current
    >> > directory (sometimes the default location).
    >> >
    >> > "Horatio J. Bilge" wrote:
    >> >>
    >> >> I had set this project aside for awhile, and I'm just getting back to
    >> >> it.
    >> >>
    >> >> I like the idea of using a dummy workbook, but it isn't working for
    >> >> me.
    >> >> Here
    >> >> is what I did:
    >> >> 1. I created the dummy workbook in the same directory as the target
    >> >> file
    >> >> 2. I went to "ThisWorkbook" in the Visual Basic Editor, and used the
    >> >> code
    >> >> you provided. I used just the filename of the target file, instead of
    >> >> the
    >> >> full path, since it was in the same directory. I saved and closed.
    >> >> 3. I opened the dummy workbook. I got a macro warning, and clicked
    >> >> "Enable
    >> >> macros." The dummy workbook opened, and stayed open, and the target
    >> >> workbook
    >> >> did not open.
    >> >> 4. I edited the code to use the full path to the target file, like you
    >> >> had
    >> >> in your code, but the result was the same.
    >> >>
    >> >> ~ Horatio
    >> >>
    >> >> "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    >> >> news:43CA6538.BAD7BFCD@verizonXSPAM.net...
    >> >> > If you want more control:
    >> >> > Try creating a dummy workbook whose only purpose is to open the
    >> >> > original
    >> >> > workbook with links updated:
    >> >> >
    >> >> > Kind of like:
    >> >> >
    >> >> > Option Explicit
    >> >> > Sub auto_open()
    >> >> > Workbooks.Open Filename:="c:\my documents\excel\book2.xls",
    >> >> > UpdateLinks:=1
    >> >> > ThisWorkbook.Close savechanges:=False
    >> >> > End Sub
    >> >> >
    >> >> > Then your users can open the dummy workbook and the links will be
    >> >> > refreshed.
    >> >> > (read about that UpdateLinks argument in VBA's help.)
    >> >> >
    >> >> > ======
    >> >> > You could even give the real workbook a password to open, but don't
    >> >> > share
    >> >> > it
    >> >> > with the users. Put the password in that macro in the dummy
    >> >> > workbook
    >> >> > and
    >> >> > the
    >> >> > users will be forced to go through your open routine.
    >> >> >
    >> >> > "Horatio J. Bilge" wrote:
    >> >> >>
    >> >> >> This is for a workbook that I will be sharing with others. I want
    >> >> >> to
    >> >> >> make
    >> >> >> sure that everyone's copy automatically updates the links, but I
    >> >> >> would
    >> >> >> like
    >> >> >> to minimize the number of clicks to open the file.
    >> >> >>
    >> >> >> Currently, they will have to click to enable macros, and then click
    >> >> >> to
    >> >> >> update the links. Some users may be worried by the wording of the
    >> >> >> update
    >> >> >> dialog box ("... links can be used to access and share confidential
    >> >> >> information without your permission..."), and won't update the
    >> >> >> links.
    >> >> >>
    >> >> >> If users have unchecked the box that you mentioned
    >> >> >> (Tools|options|edit
    >> >> >> tab),
    >> >> >> it's no problem. But for those that have that box checked, is there
    >> >> >> a
    >> >> >> way
    >> >> >> to
    >> >> >> skip the dialog box, and still update the links?
    >> >> >>
    >> >> >> Thanks,
    >> >> >> Horatio
    >> >> >>
    >> >> >> Can I force the
    >> >> >> "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    >> >> >> news:43C9A3DC.F6795659@verizonXSPAM.net...
    >> >> >> > If you tell excel that you want to be asked before updating
    >> >> >> > links,
    >> >> >> > then
    >> >> >> > excel
    >> >> >> > will respect that setting:
    >> >> >> >
    >> >> >> > Tools|options|edit tab
    >> >> >> > Uncheck "Ask to update automatic links"
    >> >> >> >
    >> >> >> > This is a user-by-user setting--not a workbook setting.
    >> >> >> >
    >> >> >> > "Horatio J. Bilge" wrote:
    >> >> >> >>
    >> >> >> >> I am trying to remove the startup prompt that asks if I want to
    >> >> >> >> update
    >> >> >> >> links
    >> >> >> >> to external workbooks (I want the links to update automatically
    >> >> >> >> for
    >> >> >> >> this
    >> >> >> >> workbook).
    >> >> >> >>
    >> >> >> >> I clicked on Edit -> Links...
    >> >> >> >> I clicked "Startup Prompt..."
    >> >> >> >> I selected "Don't display the alert and update links"
    >> >> >> >> I clicked OK, and closed the dialog box.
    >> >> >> >>
    >> >> >> >> When I try reopening the workbook, the prompt still comes up.
    >> >> >> >
    >> >> >> > --
    >> >> >> >
    >> >> >> > Dave Peterson
    >> >> >
    >> >> > --
    >> >> >
    >> >> > Dave Peterson
    >> >
    >> > --
    >> >
    >> > Dave Peterson

    >
    > --
    >
    > Dave Peterson




  10. #10
    Dave Peterson
    Guest

    Re: Startup prompt - Update links

    You may want to protect your project to keep that password a secret from others.

    Tools|VBAProject Properties|Protection tab (inside the VBE)

    "Horatio J. Bilge" wrote:
    >
    > Dave,
    >
    > Thank you for your help. I've got it working well, now. Here is the final
    > code I used in the dummy file:
    >
    > Option Explicit
    > Sub workbook_open()
    > Workbooks.Open Filename:=ThisWorkbook.Path & "\" & "book2.xls",
    > UpdateLinks:=1, Password:="GreatPassword"
    > ThisWorkbook.Close savechanges:=False
    > End Sub
    >
    > Thanks again,
    > ~ Horatio
    >
    > "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    > news:43EE6254.D557687C@verizonXSPAM.net...
    > >A general module is inserted in the VBE via: Insert|module.
    > >
    > > It's not the ThisWorkbook and it's not behind a worksheet.
    > >
    > > You could just use that same folder as the workbook that owns the code:
    > >
    > > Workbooks.Open Filename:=thisworkbook.path & "\" & "book2.xls"
    > >
    > >
    > >
    > >
    > >
    > > "Horatio J. Bilge" wrote:
    > >>
    > >> Thanks.
    > >> I wasn't certain what you meant by changing it to a general module, but I
    > >> changed the name to workbook_open, and it works fine.
    > >>
    > >> Is there a way to use a relative file path, rather than the full path?
    > >> Even
    > >> if all users put the file in the same place, the full path is different
    > >> for
    > >> each user. For example, if everyone puts it in their My Documents folder,
    > >> the full path on Windows XP would be:
    > >> "C:\Documents and Settings\[User Name]\My Documents"
    > >>
    > >> Thanks,
    > >> ~ Horatio
    > >>
    > >> "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    > >> news:43EE1600.590D3F13@verizonXSPAM.net...
    > >> > You have two choices...
    > >> >
    > >> > #1. Move the subroutine to a General module.
    > >> > #2. Change the name to Workbook_open.
    > >> >
    > >> > Auto_open in a general module and workbook_open in the ThisWorkbook
    > >> > module
    > >> > can
    > >> > accomplish the same sort of things--but you can't mix and match names
    > >> > and
    > >> > locations.
    > >> >
    > >> > Ps. I'd use the full path the workbook that you want to open. Else I
    > >> > think
    > >> > you'll find that excel wants to open a file of that name in the current
    > >> > directory (sometimes the default location).
    > >> >
    > >> > "Horatio J. Bilge" wrote:
    > >> >>
    > >> >> I had set this project aside for awhile, and I'm just getting back to
    > >> >> it.
    > >> >>
    > >> >> I like the idea of using a dummy workbook, but it isn't working for
    > >> >> me.
    > >> >> Here
    > >> >> is what I did:
    > >> >> 1. I created the dummy workbook in the same directory as the target
    > >> >> file
    > >> >> 2. I went to "ThisWorkbook" in the Visual Basic Editor, and used the
    > >> >> code
    > >> >> you provided. I used just the filename of the target file, instead of
    > >> >> the
    > >> >> full path, since it was in the same directory. I saved and closed.
    > >> >> 3. I opened the dummy workbook. I got a macro warning, and clicked
    > >> >> "Enable
    > >> >> macros." The dummy workbook opened, and stayed open, and the target
    > >> >> workbook
    > >> >> did not open.
    > >> >> 4. I edited the code to use the full path to the target file, like you
    > >> >> had
    > >> >> in your code, but the result was the same.
    > >> >>
    > >> >> ~ Horatio
    > >> >>
    > >> >> "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    > >> >> news:43CA6538.BAD7BFCD@verizonXSPAM.net...
    > >> >> > If you want more control:
    > >> >> > Try creating a dummy workbook whose only purpose is to open the
    > >> >> > original
    > >> >> > workbook with links updated:
    > >> >> >
    > >> >> > Kind of like:
    > >> >> >
    > >> >> > Option Explicit
    > >> >> > Sub auto_open()
    > >> >> > Workbooks.Open Filename:="c:\my documents\excel\book2.xls",
    > >> >> > UpdateLinks:=1
    > >> >> > ThisWorkbook.Close savechanges:=False
    > >> >> > End Sub
    > >> >> >
    > >> >> > Then your users can open the dummy workbook and the links will be
    > >> >> > refreshed.
    > >> >> > (read about that UpdateLinks argument in VBA's help.)
    > >> >> >
    > >> >> > ======
    > >> >> > You could even give the real workbook a password to open, but don't
    > >> >> > share
    > >> >> > it
    > >> >> > with the users. Put the password in that macro in the dummy
    > >> >> > workbook
    > >> >> > and
    > >> >> > the
    > >> >> > users will be forced to go through your open routine.
    > >> >> >
    > >> >> > "Horatio J. Bilge" wrote:
    > >> >> >>
    > >> >> >> This is for a workbook that I will be sharing with others. I want
    > >> >> >> to
    > >> >> >> make
    > >> >> >> sure that everyone's copy automatically updates the links, but I
    > >> >> >> would
    > >> >> >> like
    > >> >> >> to minimize the number of clicks to open the file.
    > >> >> >>
    > >> >> >> Currently, they will have to click to enable macros, and then click
    > >> >> >> to
    > >> >> >> update the links. Some users may be worried by the wording of the
    > >> >> >> update
    > >> >> >> dialog box ("... links can be used to access and share confidential
    > >> >> >> information without your permission..."), and won't update the
    > >> >> >> links.
    > >> >> >>
    > >> >> >> If users have unchecked the box that you mentioned
    > >> >> >> (Tools|options|edit
    > >> >> >> tab),
    > >> >> >> it's no problem. But for those that have that box checked, is there
    > >> >> >> a
    > >> >> >> way
    > >> >> >> to
    > >> >> >> skip the dialog box, and still update the links?
    > >> >> >>
    > >> >> >> Thanks,
    > >> >> >> Horatio
    > >> >> >>
    > >> >> >> Can I force the
    > >> >> >> "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    > >> >> >> news:43C9A3DC.F6795659@verizonXSPAM.net...
    > >> >> >> > If you tell excel that you want to be asked before updating
    > >> >> >> > links,
    > >> >> >> > then
    > >> >> >> > excel
    > >> >> >> > will respect that setting:
    > >> >> >> >
    > >> >> >> > Tools|options|edit tab
    > >> >> >> > Uncheck "Ask to update automatic links"
    > >> >> >> >
    > >> >> >> > This is a user-by-user setting--not a workbook setting.
    > >> >> >> >
    > >> >> >> > "Horatio J. Bilge" wrote:
    > >> >> >> >>
    > >> >> >> >> I am trying to remove the startup prompt that asks if I want to
    > >> >> >> >> update
    > >> >> >> >> links
    > >> >> >> >> to external workbooks (I want the links to update automatically
    > >> >> >> >> for
    > >> >> >> >> this
    > >> >> >> >> workbook).
    > >> >> >> >>
    > >> >> >> >> I clicked on Edit -> Links...
    > >> >> >> >> I clicked "Startup Prompt..."
    > >> >> >> >> I selected "Don't display the alert and update links"
    > >> >> >> >> I clicked OK, and closed the dialog box.
    > >> >> >> >>
    > >> >> >> >> When I try reopening the workbook, the prompt still comes up.
    > >> >> >> >
    > >> >> >> > --
    > >> >> >> >
    > >> >> >> > Dave Peterson
    > >> >> >
    > >> >> > --
    > >> >> >
    > >> >> > Dave Peterson
    > >> >
    > >> > --
    > >> >
    > >> > Dave Peterson

    > >
    > > --
    > >
    > > Dave Peterson


    --

    Dave Peterson

  11. #11
    Horatio J. Bilge
    Guest

    Re: Startup prompt - Update links

    I did that. Thanks.
    ~ Horatio


    "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    news:43F1EDCA.2F0399F6@verizonXSPAM.net...
    > You may want to protect your project to keep that password a secret from
    > others.
    >
    > Tools|VBAProject Properties|Protection tab (inside the VBE)
    >
    > "Horatio J. Bilge" wrote:
    >>
    >> Dave,
    >>
    >> Thank you for your help. I've got it working well, now. Here is the final
    >> code I used in the dummy file:
    >>
    >> Option Explicit
    >> Sub workbook_open()
    >> Workbooks.Open Filename:=ThisWorkbook.Path & "\" & "book2.xls",
    >> UpdateLinks:=1, Password:="GreatPassword"
    >> ThisWorkbook.Close savechanges:=False
    >> End Sub
    >>
    >> Thanks again,
    >> ~ Horatio
    >>
    >> "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    >> news:43EE6254.D557687C@verizonXSPAM.net...
    >> >A general module is inserted in the VBE via: Insert|module.
    >> >
    >> > It's not the ThisWorkbook and it's not behind a worksheet.
    >> >
    >> > You could just use that same folder as the workbook that owns the code:
    >> >
    >> > Workbooks.Open Filename:=thisworkbook.path & "\" & "book2.xls"
    >> >
    >> >
    >> >
    >> >
    >> >
    >> > "Horatio J. Bilge" wrote:
    >> >>
    >> >> Thanks.
    >> >> I wasn't certain what you meant by changing it to a general module,
    >> >> but I
    >> >> changed the name to workbook_open, and it works fine.
    >> >>
    >> >> Is there a way to use a relative file path, rather than the full path?
    >> >> Even
    >> >> if all users put the file in the same place, the full path is
    >> >> different
    >> >> for
    >> >> each user. For example, if everyone puts it in their My Documents
    >> >> folder,
    >> >> the full path on Windows XP would be:
    >> >> "C:\Documents and Settings\[User Name]\My Documents"
    >> >>
    >> >> Thanks,
    >> >> ~ Horatio
    >> >>
    >> >> "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    >> >> news:43EE1600.590D3F13@verizonXSPAM.net...
    >> >> > You have two choices...
    >> >> >
    >> >> > #1. Move the subroutine to a General module.
    >> >> > #2. Change the name to Workbook_open.
    >> >> >
    >> >> > Auto_open in a general module and workbook_open in the ThisWorkbook
    >> >> > module
    >> >> > can
    >> >> > accomplish the same sort of things--but you can't mix and match
    >> >> > names
    >> >> > and
    >> >> > locations.
    >> >> >
    >> >> > Ps. I'd use the full path the workbook that you want to open. Else
    >> >> > I
    >> >> > think
    >> >> > you'll find that excel wants to open a file of that name in the
    >> >> > current
    >> >> > directory (sometimes the default location).
    >> >> >
    >> >> > "Horatio J. Bilge" wrote:
    >> >> >>
    >> >> >> I had set this project aside for awhile, and I'm just getting back
    >> >> >> to
    >> >> >> it.
    >> >> >>
    >> >> >> I like the idea of using a dummy workbook, but it isn't working for
    >> >> >> me.
    >> >> >> Here
    >> >> >> is what I did:
    >> >> >> 1. I created the dummy workbook in the same directory as the target
    >> >> >> file
    >> >> >> 2. I went to "ThisWorkbook" in the Visual Basic Editor, and used
    >> >> >> the
    >> >> >> code
    >> >> >> you provided. I used just the filename of the target file, instead
    >> >> >> of
    >> >> >> the
    >> >> >> full path, since it was in the same directory. I saved and closed.
    >> >> >> 3. I opened the dummy workbook. I got a macro warning, and clicked
    >> >> >> "Enable
    >> >> >> macros." The dummy workbook opened, and stayed open, and the target
    >> >> >> workbook
    >> >> >> did not open.
    >> >> >> 4. I edited the code to use the full path to the target file, like
    >> >> >> you
    >> >> >> had
    >> >> >> in your code, but the result was the same.
    >> >> >>
    >> >> >> ~ Horatio
    >> >> >>
    >> >> >> "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    >> >> >> news:43CA6538.BAD7BFCD@verizonXSPAM.net...
    >> >> >> > If you want more control:
    >> >> >> > Try creating a dummy workbook whose only purpose is to open the
    >> >> >> > original
    >> >> >> > workbook with links updated:
    >> >> >> >
    >> >> >> > Kind of like:
    >> >> >> >
    >> >> >> > Option Explicit
    >> >> >> > Sub auto_open()
    >> >> >> > Workbooks.Open Filename:="c:\my documents\excel\book2.xls",
    >> >> >> > UpdateLinks:=1
    >> >> >> > ThisWorkbook.Close savechanges:=False
    >> >> >> > End Sub
    >> >> >> >
    >> >> >> > Then your users can open the dummy workbook and the links will be
    >> >> >> > refreshed.
    >> >> >> > (read about that UpdateLinks argument in VBA's help.)
    >> >> >> >
    >> >> >> > ======
    >> >> >> > You could even give the real workbook a password to open, but
    >> >> >> > don't
    >> >> >> > share
    >> >> >> > it
    >> >> >> > with the users. Put the password in that macro in the dummy
    >> >> >> > workbook
    >> >> >> > and
    >> >> >> > the
    >> >> >> > users will be forced to go through your open routine.
    >> >> >> >
    >> >> >> > "Horatio J. Bilge" wrote:
    >> >> >> >>
    >> >> >> >> This is for a workbook that I will be sharing with others. I
    >> >> >> >> want
    >> >> >> >> to
    >> >> >> >> make
    >> >> >> >> sure that everyone's copy automatically updates the links, but I
    >> >> >> >> would
    >> >> >> >> like
    >> >> >> >> to minimize the number of clicks to open the file.
    >> >> >> >>
    >> >> >> >> Currently, they will have to click to enable macros, and then
    >> >> >> >> click
    >> >> >> >> to
    >> >> >> >> update the links. Some users may be worried by the wording of
    >> >> >> >> the
    >> >> >> >> update
    >> >> >> >> dialog box ("... links can be used to access and share
    >> >> >> >> confidential
    >> >> >> >> information without your permission..."), and won't update the
    >> >> >> >> links.
    >> >> >> >>
    >> >> >> >> If users have unchecked the box that you mentioned
    >> >> >> >> (Tools|options|edit
    >> >> >> >> tab),
    >> >> >> >> it's no problem. But for those that have that box checked, is
    >> >> >> >> there
    >> >> >> >> a
    >> >> >> >> way
    >> >> >> >> to
    >> >> >> >> skip the dialog box, and still update the links?
    >> >> >> >>
    >> >> >> >> Thanks,
    >> >> >> >> Horatio
    >> >> >> >>
    >> >> >> >> Can I force the
    >> >> >> >> "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
    >> >> >> >> news:43C9A3DC.F6795659@verizonXSPAM.net...
    >> >> >> >> > If you tell excel that you want to be asked before updating
    >> >> >> >> > links,
    >> >> >> >> > then
    >> >> >> >> > excel
    >> >> >> >> > will respect that setting:
    >> >> >> >> >
    >> >> >> >> > Tools|options|edit tab
    >> >> >> >> > Uncheck "Ask to update automatic links"
    >> >> >> >> >
    >> >> >> >> > This is a user-by-user setting--not a workbook setting.
    >> >> >> >> >
    >> >> >> >> > "Horatio J. Bilge" wrote:
    >> >> >> >> >>
    >> >> >> >> >> I am trying to remove the startup prompt that asks if I want
    >> >> >> >> >> to
    >> >> >> >> >> update
    >> >> >> >> >> links
    >> >> >> >> >> to external workbooks (I want the links to update
    >> >> >> >> >> automatically
    >> >> >> >> >> for
    >> >> >> >> >> this
    >> >> >> >> >> workbook).
    >> >> >> >> >>
    >> >> >> >> >> I clicked on Edit -> Links...
    >> >> >> >> >> I clicked "Startup Prompt..."
    >> >> >> >> >> I selected "Don't display the alert and update links"
    >> >> >> >> >> I clicked OK, and closed the dialog box.
    >> >> >> >> >>
    >> >> >> >> >> When I try reopening the workbook, the prompt still comes up.
    >> >> >> >> >
    >> >> >> >> > --
    >> >> >> >> >
    >> >> >> >> > Dave Peterson
    >> >> >> >
    >> >> >> > --
    >> >> >> >
    >> >> >> > Dave Peterson
    >> >> >
    >> >> > --
    >> >> >
    >> >> > Dave Peterson
    >> >
    >> > --
    >> >
    >> > Dave Peterson

    >
    > --
    >
    > Dave Peterson




+ Reply to Thread

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