+ Reply to Thread
Results 1 to 14 of 14

Open from Desktop - second book

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Open from Desktop - second book

    I have the following routine I use to open a workbook from my user's desktops. I didn't come up with it on my own, so I'm not sure how to modify it.

    Please Login or Register  to view this content.
    I want to open not only the "BR1011..." workbook, but also the "PivotsforAnalysis.xls" workbook. How do I modify the code to do that? Any help is greatly appreciated.

    Thanks,
    John
    Last edited by jomili; 03-11-2011 at 11:04 AM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Open from Desktop - second book

    Hello John,

    Perhaps this less cryptic macro code will suffice.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Re: Open from Desktop - second book

    Leath,

    I tried your code as shown below. No workbooks opened other than the source workbook. Do I have something configured incorrectly?
    Please Login or Register  to view this content.

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Open from Desktop - second book

    Small correction to the loop:
    Please Login or Register  to view this content.
    Remember what the dormouse said
    Feed your head

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Open from Desktop - second book

    Hello Romper,

    Thanks for catching and correcting my omission.

  6. #6
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Re: Open from Desktop - second book

    Thanks Leath AND Romper,

    You guys are a big help. I made the correction and it's running beautifully now. But one related question; the two workbooks I'm opening ask if I want to update them; can I defeat that prompt?

  7. #7
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Open from Desktop - second book

    Hello jomili,

    Try this. This should update the workbooks without prompting you.
    Please Login or Register  to view this content.

  8. #8
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Re: Open from Desktop - second book

    Arrrgghhh! Fix one thing, break another...

    Leath,
    Your change got past the first obstacle. Now I'm presented with a message saying:
    Please Login or Register  to view this content.
    Manually, I'd want to just click the "Continue" button, so I can use the file. The workbooks I'm opening don't belong to me, so I have no choice but to push past. So, how do I sail past this one, too?

  9. #9
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Re: Open from Desktop - second book

    Okay, I found one way: I changed the
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Is there a more correct way?

  10. #10
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Open from Desktop - second book

    Hello jomili,

    VBA interprets a zero for a Boolean type varable as FALSE.

  11. #11
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Re: Open from Desktop - second book

    So changing it to 0 means DON'T update the values, correct? I think that's probably what I want to do, so no flags come up at all.

    Thanks,
    John

  12. #12
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Open from Desktop - second book

    Hello John,

    Yes, a zero or FALSE would mean do not update links to other workbooks.

  13. #13
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Re: Open from Desktop - second book

    Thanks Leath, and thanks also to Romper; you guys are always a great help to me, and I thank God every day that there're such good, helpful people in the world. You're awesome, and I really appreciate you!

    Thanks,
    John

  14. #14
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Open from Desktop - second book

    Glad to help, and thank you for the kind words.

+ 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