+ Reply to Thread
Results 1 to 6 of 6

Ensure TextBoxes are Filled in VBA Forms

  1. #1
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Ensure TextBoxes are Filled in VBA Forms

    I have, 10 Textbox with such names as follows.
    nomeempresarial
    cnpjcpf
    fantasy
    street
    number
    neighborhood
    uf
    city
    responsible
    phone


    How can I ensure that the user will fill all the text boxes on a mandatory?
    none of the text boxes can is empty, when CommandButton is pressed!
    Last edited by marreco; 06-07-2012 at 04:18 PM.
    "No xadrez nem sempre a menor dist?ncia entre dois pontos ? uma linha reta" G. Kasparov.

    If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select b from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.

  2. #2
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: Ensure TextBoxes are Filled in VBA Forms

    Hi.

    I'll send my attachment
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor
    Join Date
    05-21-2009
    Location
    Great Britain
    MS-Off Ver
    Excel 2003
    Posts
    550

    Re: Ensure TextBoxes are Filled in VBA Forms

    Try this:
    Please Login or Register  to view this content.
    Post responsibly. Search for excelforum.com

  4. #4
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: Ensure TextBoxes are Filled in VBA Forms

    Hi.
    Thanks for responding, but I need my code does not save if your code finds empty text box.
    How can I add my code with yours so that by pressing the "SALVAR" will only be saved if all the text boxes are filled?
    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: Ensure TextBoxes are Filled in VBA Forms

    Give it a try.
    Please Login or Register  to view this content.
    Kind regards, Harry.

  6. #6
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: Ensure TextBoxes are Filled in VBA Forms

    Hi.

    Very good it was perfect, that's great, thank you very much!

+ 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