+ Reply to Thread
Results 1 to 6 of 6

VBA Submit Error

  1. #1
    Forum Contributor
    Join Date
    04-09-2014
    Location
    Derby
    MS-Off Ver
    Office 2013 - For my sins
    Posts
    122

    VBA Submit Error

    Hi Guys,

    I currently have VBA running so when the submit button is pressed the data will transfer to another tab.

    This is working and I have error messages when there is data missing. An error box comes up for the corresponding ComboBox when the user presses submit.

    Let's say there's data in 4 out of the 5 text box's when I press submit the error box comes up fine but the data is submitted to the spreadsheet, how do I stop this from happening??

    Also when the userform is run, it seems to start at date, how do I get it to start at name instead?

    I've included the code below and also attached the spreadsheet.

    Thanks in advance everyone!!!

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    08-16-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2019
    Posts
    209

    Re: VBA Submit Error

    Hi Frank,


    To get your Name highlighted at the beginning, please paste this formula. (the check should be on top)
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    And To stop Macro pasting the data when the date is wrong.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Cheers.
    Lex

  3. #3
    Forum Contributor
    Join Date
    04-09-2014
    Location
    Derby
    MS-Off Ver
    Office 2013 - For my sins
    Posts
    122

    Re: VBA Submit Error

    Hi Lex,

    Thanks for getting back to me and the top VBA works perfectly so thanks.

    The second part, I've put in place of the existing code I have but it doesn't seem to be working.

    If I haven't been clear enough I apologise, but if any data is missing the data that is there shouldn't be submitted.

    Hope this helps, thanks again.

  4. #4
    Forum Contributor
    Join Date
    08-16-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2019
    Posts
    209

    Re: VBA Submit Error

    Hi Frank,

    Please see file attached. If any of these variables e.g. name, Date, Team, Division, Action are missing. The macro will stop and force user to fill it in again.

    Thanks
    Lex
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    04-09-2014
    Location
    Derby
    MS-Off Ver
    Office 2013 - For my sins
    Posts
    122

    Re: VBA Submit Error

    Hi Lex,

    Thanks for getting back to me so quickly.

    What you've attached is arranged differently but it works perfectly.

    Thanks for helping me out and attaching the spreadsheet.

    Reputation added for you my friend!!!!

    Thanks

    Frank

  6. #6
    Forum Contributor
    Join Date
    08-16-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2019
    Posts
    209

    Re: VBA Submit Error

    HI Frank

    No worries. Glad to Help

    Lex

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Code error: Wont submit data from userform to seperate sheet and new line
    By mwinter in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-07-2014, 10:11 AM
  2. [SOLVED] Clearing a Combo Box then trying to submit user form to Workbook gives error messages
    By colvinb in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-21-2012, 02:18 PM
  3. Replies: 1
    Last Post: 02-05-2012, 09:31 PM
  4. Create a Submit button save filename as A1, submit email unc path, etc.
    By briant97 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-30-2009, 09:52 AM
  5. Submit to SQL Server error
    By Jim Hutchinson in forum Excel General
    Replies: 1
    Last Post: 02-25-2005, 10:06 AM

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