+ Reply to Thread
Results 1 to 5 of 5

If a special string than don't run vba

  1. #1
    Forum Contributor
    Join Date
    08-20-2013
    Location
    LX
    MS-Off Ver
    Office 2019
    Posts
    166

    If a special string than don't run vba

    Hello I have following code (thanks to norie)
    This code compares the dates in column B and C. Additional to this I want that when I enter a special name lets say *HOLIDAY* in column A that this marco don't run. Is there a way to add this?
    Thanks for your reply.

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor Gatti's Avatar
    Join Date
    06-08-2015
    Location
    Brasil, São Paulo, Ribeirão Preto
    MS-Off Ver
    365
    Posts
    346

    Re: If a special string than don't run vba

    Put this code before the Application.EnableEvents

    Please Login or Register  to view this content.
    If I have solved your question, please mark the thread as [SOLVED],
    And consider adding reputation

    ?Simplicity is the ultimate sophistication? (Leonardo Da Vinci)

    Regards,
    F?bio Gatti

    https://www.youtube.com/pulodogatti
    https://www.linkedin.com/in/fabiocgatti/
    https://instagram.com/pulodogatti

  3. #3
    Forum Contributor
    Join Date
    08-20-2013
    Location
    LX
    MS-Off Ver
    Office 2019
    Posts
    166

    Re: If a special string than don't run vba

    Thanks for your reply Gatti.
    Ok my mistake. I didn't post the whole code. When I put your code nothing will work in the code below. But I want that only the code in red don't run when holiday is enter

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor Gatti's Avatar
    Join Date
    06-08-2015
    Location
    Brasil, São Paulo, Ribeirão Preto
    MS-Off Ver
    365
    Posts
    346

    Re: If a special string than don't run vba

    Hey, do this then:

    Before Red Code:

    Please Login or Register  to view this content.
    After Red Code:

    Please Login or Register  to view this content.
    This way:

    Please Login or Register  to view this content.
    Is that ok for you?

  5. #5
    Forum Contributor
    Join Date
    08-20-2013
    Location
    LX
    MS-Off Ver
    Office 2019
    Posts
    166

    Re: If a special string than don't run vba

    Simply Perfect.

    Thanks Gatti.

+ 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. Extract special characters from a string
    By Nadine74 in forum Excel General
    Replies: 3
    Last Post: 04-17-2014, 01:41 PM
  2. Delete Row with string containing special character
    By DoodlesMama in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-24-2014, 06:02 PM
  3. [SOLVED] Finding special character in a string
    By sathishkm in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-01-2013, 06:10 AM
  4. [SOLVED] extract string after nth string (special character)
    By itselflearn in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-24-2013, 03:18 PM
  5. String Match & Special Characters
    By camikins in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-13-2010, 01:33 PM
  6. [SOLVED] Special characters in a string variable
    By ben.biddle@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-04-2006, 03:40 PM
  7. remove special character at end of string
    By captain bob in forum Excel General
    Replies: 0
    Last Post: 08-03-2006, 09:59 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