+ Reply to Thread
Results 1 to 4 of 4

Wait for user to open new file

  1. #1
    Registered User
    Join Date
    03-06-2013
    Location
    Smoketown, PA
    MS-Off Ver
    Excel Professional 2010
    Posts
    13

    Wait for user to open new file

    I need help writing code that will allow the user to open a new file (from an e-mail update) before continuing.

    So far I have this:
    Please Login or Register  to view this content.
    It works fine in break mode, but when I try to run the code, the new workbook doesn't open until after I try to activate it.

    Should I put the wait somewhere else?

    I know it would be nice to have the workbook saved to a harddrive, but the reality of the situation is... just not going to happen today. Too many hands in one file. So any help with this question would be much appreciated!

    Thanks in advance.

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Wait for user to open new file

    I would try and approach this by getting the user to open the e-mail, then getting excel to connect to outlook and pick up the attachment as an object, and open it that way.

    Please Login or Register  to view this content.
    that would get you as far as getting the first attachment of the first open e-mail. I'm not sure how to go about opening it without saving it to the hard drive first though...

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Wait for user to open new file

    Hi, bishope,

    maybe use either GetOpenFilename or Application.Dialogs(xlDialogOpen) and set an object to the workbook just opened. This will only work when the file has been saved to any place before, and even the opening of a file from Outlook puts it into a temporary folder on the harddrive.

    Ciao,
    Holger
    Last edited by HaHoBe; 04-24-2013 at 11:50 AM.
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Registered User
    Join Date
    03-06-2013
    Location
    Smoketown, PA
    MS-Off Ver
    Excel Professional 2010
    Posts
    13

    Re: Wait for user to open new file

    Thanks to everyone who replied. I think the easiest solution is to set up an automatic save when the document in question arrives and then it will be more easily accessible.

    Sometimes I just need to walk away from the question for an hour before I realize that what I'm trying to do is ridiculous and/or unnecessary.

+ 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