+ Reply to Thread
Results 1 to 8 of 8

Checking and Validating a textbox IF.....

  1. #1
    Registered User
    Join Date
    04-23-2013
    Location
    Jordan
    MS-Off Ver
    Excel 2010
    Posts
    77

    Checking and Validating a textbox IF.....

    Can we us this code , I guess no :D
    any Idea how to do it ???

    Please Login or Register  to view this content.
    When using the AddAndNew click , I need it to check if TextBox1 has a value if ComboBox1 was selected !!!

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Checking and Validating a textbox IF.....

    I'm not entirely sure what you are trying to do but the code you posted has a problem in that you don't have a matching number of "If" and "end If". So you could try:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-23-2013
    Location
    Jordan
    MS-Off Ver
    Excel 2010
    Posts
    77

    Re: Checking and Validating a textbox IF.....

    Thank you yudlugar,
    what I need to do , when doing the save button ,
    I need it to check if ComboBox1 if it has a value or text , then cant do the saving if textbox1 is empty !

    I tried the end if but I guess the code part where is
    Please Login or Register  to view this content.
    is wrong

  4. #4
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Checking and Validating a textbox IF.....

    That looks ok to me, it could be the Me part that is causing a problem. Try replacing "Me" with the name of the userform/location of the boxes.

    If you could upload an example workbook it might be easier to find the problem.

  5. #5
    Registered User
    Join Date
    04-23-2013
    Location
    Jordan
    MS-Off Ver
    Excel 2010
    Posts
    77

    Re: Checking and Validating a textbox IF.....

    the used form "Expenses"

    it will stuck now where is the end if
    try to fill the second exps line without a value , then click save !!! it must give a warning that the amount of the second row is empty


    Copyexpw.xlsm
    Last edited by Shacker; 05-13-2013 at 11:41 AM.

  6. #6
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Checking and Validating a textbox IF.....

    There is a password on the VBA project..

  7. #7
    Registered User
    Join Date
    04-23-2013
    Location
    Jordan
    MS-Off Ver
    Excel 2010
    Posts
    77

    Re: Checking and Validating a textbox IF.....

    I uploaded another one , sorry
    try the new one at the same place
    Copyexpw.xlsm

  8. #8
    Registered User
    Join Date
    04-23-2013
    Location
    Jordan
    MS-Off Ver
    Excel 2010
    Posts
    77

    Re: Checking and Validating a textbox IF.....

    Copyexpw.xlsm

    sorry for that :D

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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