Closed Thread
Results 1 to 4 of 4

Code To Check blank textbox in userform with yes no msgbox

  1. #1
    Registered User
    Join Date
    11-29-2010
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    17

    Code To Check blank textbox in userform with yes no msgbox

    Dear Members,

    I am using a worksheet, as a database table, and using a user form to fill the data into the worksheet. I am trying to save the data into the worksheet, by checking all the blank text boxes and presenting the user with choice of yes or no message box and let user decide the next action like the below scenario

    I am using the following code, which checks the blank text boxes and shows ok message. It dont allow to save untill all the balnk text boxes will be filled. But i want the follwing scenario

    [b]If I click the save button on the user form, if there is any blank textbox in the user form, a message box with “YES” “NO” buttons has to be pop up, with message like example “ Customer name was not entered Do you want to enter ”.

    If I click “YES”, it has to go to the blank field. If I click “NO”, it has exit the message box and go to the next blank field if any. It has to check all blank fields, and then only save the data into the worksheet table.

    I am sending the following code, which I am using.

    I am not sure what is the exact vba code for the above scenario

    Any help in this regard is greatly appreciated

    I am attaching the excel file with user form, to check my code


    I am using the following CODE Currently:

    Please Login or Register  to view this content.
    Regards
    JWALA
    Attached Files Attached Files
    Last edited by jwala; 11-30-2010 at 06:29 AM.

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Code To Check blank textbox in userform with yes no msgbox

    Also:

    Your post does not comply with Rule 8 of our Forum RULES. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser)to the cross-post. Expect cross-posts without a link to be closed a message will be posted by the moderator explaining why. We are here to help so help us help you!

    Read this to understand why we ask you to do this
    Remember what the dormouse said
    Feed your head

  3. #3
    Registered User
    Join Date
    11-29-2010
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Code To Check blank textbox in userform with yes no msgbox

    Dear Members

    DId any body have idea about the code, necessary for the abvoe scenario

    Regards
    jwala

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Code To Check blank textbox in userform with yes no msgbox

    Since you have ignored my request, I'm locking this. Feel free to repost with a link to your post(s) in other forums.

Closed 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