+ Reply to Thread
Results 1 to 4 of 4

If AND condition

  1. #1
    Registered User
    Join Date
    06-29-2022
    Location
    Manila, Philippines
    MS-Off Ver
    2022
    Posts
    3

    If AND condition

    Hello,

    Im trying to use IF AND condition for validation, if textbox status isnot = Not Started and datehandled = "" then but the error is Compile error: Expected: expression. Here's my code below

    Please Login or Register  to view this content.
    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #2 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
    Last edited by 6StringJazzer; 06-29-2022 at 11:21 AM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,532

    Re: If AND condition

    In VBA, each line of code is assumed to be on one physical line. You are splitting one line of code onto two physical lines. To do that you must include a line continuation character "_" as the last character of the first line.

    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    06-29-2022
    Location
    Manila, Philippines
    MS-Off Ver
    2022
    Posts
    3

    Re: If AND condition

    Hello,

    It works!! Thanks a lot!!
    Last edited by ramonthepsycho; 06-29-2022 at 11:57 AM.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,532

    Re: If AND condition

    If your question has been answered please mark your thread as "Solved" so that members will know by looking at the thread title that your problem is solved. Go to the menu immediately above your first post to the thread and click on Thread Tools. From the dropdown menu select "Mark this thread as solved..."

    If a member helped you solve your problem, consider adding to their reputation by clicking addreputationiconsmall.jpg below their name.

+ 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. Respective supplier turn into red if condition met - Condition formating
    By Yaseennab in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-04-2022, 07:41 AM
  2. Replies: 19
    Last Post: 05-21-2019, 03:17 PM
  3. [SOLVED] Condition Forumula if Columns have Strings and if they match to preset condition
    By rosn.dhakal in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-02-2018, 10:57 PM
  4. [SOLVED] Rotate List of names bottom to top Repeat without condition with option to set a condition
    By spyac in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-05-2018, 05:17 PM
  5. Replies: 7
    Last Post: 06-01-2015, 06:05 PM
  6. Condition formatting of multiple condition formatted cells
    By merrin84 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 02-22-2015, 05:08 PM
  7. multi condition format? lookup and date condition valid for.
    By D_Rennie in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-13-2009, 11:37 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