+ Reply to Thread
Results 1 to 3 of 3

VBA Error Message Appearing if form not saved

  1. #1
    Registered User
    Join Date
    10-18-2012
    Location
    Jackson, MI
    MS-Off Ver
    Excel 2010
    Posts
    8

    VBA Error Message Appearing if form not saved

    I have created a form to save daily inspections using VBA and a Form Control Button (Save Form) based on the entry of a part# and date in two adjacent cells. The operator enters Part# in Cell B1 and Date in Cell B2 and selects the "Save Form" control button to unlock additional cells and start data entry.

    If a duplicate form is attempted to be created/saved, the error message “A File Name \\xxx.xlsm already exists in this location. Do you want to replace it?” appears as expected.

    When the user selects “No”, another Microsoft Visual Basic Message Box immediately appears indicating a Run Time has error has occurred because the form was not saved. The Message box requires the user to select “Debug, End or Help”

    Is there any method to stop the MS VBA error message box from appearing after the user selects “No” upon receiving the initial error method?

    Here is the code I am currently using to save the form:

    Please Login or Register  to view this content.
    Last edited by Cutter; 10-18-2012 at 05:00 PM. Reason: Added code tags

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: VBA Error Message Appearing if form not saved

    Hello ut1anderson,

    Oops! you have not followed the Forum Rules. "Wrap your Code in Tags"

    If you do not follow the Forum rules, we may not be willing to help you.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Registered User
    Join Date
    10-18-2012
    Location
    Jackson, MI
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: VBA Error Message Appearing if form not saved

    Let me try again. Hope this works -

    Please Login or Register  to view this content.

+ 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