+ Reply to Thread
Results 1 to 4 of 4

VBA Code Opens a workbook but won't pull up InputBoxes and Allow user to select a cell

  1. #1
    Registered User
    Join Date
    01-11-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    1

    VBA Code Opens a workbook but won't pull up InputBoxes and Allow user to select a cell

    I have a Macro which prompts the user to select files to analyze then it opens each workbook propmts the user to answer some yes/no questions and select some cells. After the user responds to the message and input boxes the macro analyzes the open workbook and pastes relevant data to a masterworkbook. The macro closes the workbook and then proceed to the next file.

    The problem I am having is the macro will prompt the user to select the files open the files and then stop, no error messages, nothing.

    Then if I go back to the masterworkbook and start the macro again it asks me to select the files again but when it goes to open them it says the first workbook is already open. I click open anyway and it then it goes to the questions it should be asking, however when it gets to the inputbox that asks for the user to select a cell it won't allow the user to activate the openworkbook to select the cells they need to.

    The code is below:

    Please Login or Register  to view this content.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: VBA Code Opens a workbook but won't pull up InputBoxes and Allow user to select a cell

    try using a shortcut key combination that does not involve the shift key to run the macro
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: VBA Code Opens a workbook but won't pull up InputBoxes and Allow user to select a cell

    One thing I notice is you've turned off Screen Updating. So you wouldn't see the workbooks that you open and you wouldn't be able to select a range when prompted.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: VBA Code Opens a workbook but won't pull up InputBoxes and Allow user to select a cell

    Is there any code in the workbooks being opened?

    Do you get any of the message boxes?

    Also, and this is kind of off topic, which workbooks are ScopeSheets and COAWorkbook meant to refer to?

    At the start of the code you have this.
    Please Login or Register  to view this content.
    Then you open a workboook and have this which sets ScopeSheets to refer to the newly opened workbook.
    Please Login or Register  to view this content.
    A few lines later you have this which sets COAWorkboook to refer to the newly opened workbook
    Please Login or Register  to view this content.
    So both ScopeSheets and COAWorkbook refer to the opened workbook.

    Is that's what's meant to happen?

    PS You don't need to use Select Case where there are only 2 options, especially when they are True/False - use If instead.
    If posting code please use code tags, see here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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