+ Reply to Thread
Results 1 to 9 of 9

Change code to require a Response

  1. #1
    Registered User
    Join Date
    04-08-2012
    Location
    Kansas, U.S
    MS-Off Ver
    Excel 2010
    Posts
    93

    Change code to require a Response

    Hello All,

    Ok ive been asked by the boss to make some changes to the code below:

    Boss want the user's to be required to fill in the Two fields before being aloud to procede to the next step in the inventory.
    I marked the fields that require a response:

    Please Login or Register  to view this content.
    As always thank's for Your Help with this


    Aeneren

  2. #2
    Valued Forum Contributor AlvaroSiza's Avatar
    Join Date
    09-19-2007
    Location
    Staffordshire
    MS-Off Ver
    2007
    Posts
    591

    Re: Change code to require a Response

    Perhaps change your strFileNum and strFileName to:

    Please Login or Register  to view this content.
    Please report back.

    -as-
    Perhaps it was the Noid who should have avoided me...
    If you are satisfied with my solution click the small star icon on the left. Thanks
    1. Make a copy of your workbook and run the following code on your copy (just in case)
    2. With excel open, press ALT+F11 to open the Visual Basic Editor (VBE). From the "Insert" menu, select "Module".
    3. Paste the code from above into the empty white space. Close the VBE.
    4. From the developer tab, choose "Macros", select the Sub Name, and click "Run".

  3. #3
    Registered User
    Join Date
    04-08-2012
    Location
    Kansas, U.S
    MS-Off Ver
    Excel 2010
    Posts
    93

    Re: Change code to require a Response

    AlvaroSiza,

    Thanks for the Response, Your change does work but i am looking more along the lines of the user having to pick there name and Truck number from the Data Validation Lists that are already in the workbook.

    Ive attached a small example file this time for your viewing.

    Aeneren

    Inventory Sample-3.xlsm

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: Change code to require a Response

    You could add an IF statement before the Save line, e.g.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-08-2012
    Location
    Kansas, U.S
    MS-Off Ver
    Excel 2010
    Posts
    93

    Re: Change code to require a Response

    Paul,

    Thank you for your response as well

    All 3 of them lol, thinking the boards got a glitch tonight

    Aeneren

  6. #6
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: Change code to require a Response

    Glitch seems to be an understatement. Just deleted all the duplicate responses..

  7. #7
    Registered User
    Join Date
    04-08-2012
    Location
    Kansas, U.S
    MS-Off Ver
    Excel 2010
    Posts
    93

    Re: Change code to require a Response

    Paul,

    Your Code is working a Msg box comes up If one or both fields are open, but as soon as i click OK it advances to the next Sheet.

    Please Login or Register  to view this content.
    is it possible the macro that the Start Inventory is activating is the cause.

    Please Login or Register  to view this content.

    Thanks Aeneren

  8. #8
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: Change code to require a Response

    You forgot to keep in the "Exit Sub" before the "End If". Also, it's great that you created all of those variables. If you want to continue using them you can, but it could also be setup like the following (also added a check to ensure there was a valid date in F2):
    Please Login or Register  to view this content.
    Last edited by Paul; 04-22-2012 at 06:09 AM.

  9. #9
    Registered User
    Join Date
    04-08-2012
    Location
    Kansas, U.S
    MS-Off Ver
    Excel 2010
    Posts
    93

    Re: Change code to require a Response

    Paul,

    Same thing again i am uploading the test Book im using also.



    Aeneren
    Attached Files Attached Files

+ 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