+ Reply to Thread
Results 1 to 10 of 10

Call Macro's if D1 = "text"

  1. #1
    Registered User
    Join Date
    02-27-2019
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    70

    Call Macro's if D1 = "text"

    Hello,

    I used the code below to call a macro is D1 is a certain text.
    If it not true then another macro is called.
    The macro's work fine if i just call them without VBA code.
    I think somthing is nog right in the "If" line but i don't know what.

    Please Login or Register  to view this content.
    Tx for helping out!

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Call Macro's if D1 = "text"

    Hi Afjio12,

    The If statement should be fine, but 1. It is case sensitive, so does the cell have "English" or "english" in it? 2. Is the language entered as text or the result of a formula? 3. Is the sheet with D1 the active sheet when the macro runs?
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,765

    Re: Call Macro's if D1 = "text"

    I think it will be case of sensitivity.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  4. #4
    Registered User
    Join Date
    02-27-2019
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    70

    Re: Call Macro's if D1 = "text"

    No the text is exactly the same and entered by a pulldown menu. There is only 1 sheet so that shouldn't be the case either

  5. #5
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Call Macro's if D1 = "text"

    Any chance you can attach the file?

  6. #6
    Registered User
    Join Date
    02-27-2019
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    70

    Re: Call Macro's if D1 = "text"

    Yes here it is
    Attached Files Attached Files

  7. #7
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,765

    Re: Call Macro's if D1 = "text"

    You got this macro inside sheet code.
    If you want to run it automatically after dropdown menu choice you have to change it into:

    Please Login or Register  to view this content.
    check attached file.
    Attached Files Attached Files

  8. #8
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Call Macro's if D1 = "text"

    Afjio12,

    Die macro doet het wel? Is de bedoeling dat die automatisch loopt als D1 verandert?

    Edit KOKOSEK beat me to it, I was getting at the same thing lol.

  9. #9
    Registered User
    Join Date
    02-27-2019
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    70

    Re: Call Macro's if D1 = "text"

    Yes this works
    Tx for your help!

  10. #10
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,765

    Re: Call Macro's if D1 = "text"

    You welcome.
    If you happy with solution, please use Thread tools and mark Thread as SOLVED.

+ 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. [SOLVED] Protecting worksheet but allowing "forms" button to still call a macro
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-28-2014, 05:58 PM
  2. Replies: 1
    Last Post: 08-15-2014, 06:00 AM
  3. Using 'Filter(array,"text")' within a macro for lines that begin with "text"
    By Rhudi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-02-2014, 02:22 AM
  4. [SOLVED] Jumping to the macro from the "Call" line while viewing the code
    By Alexander_Golinsky in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-13-2013, 05:23 AM
  5. How can i copy value from "HTMLText"(EMBED("Forms.HTML:Text","")),using Macro
    By andrewyang in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2010, 12:47 AM
  6. Call a sub statement in "Personal Macro Workbook" from "ThisWorkbo
    By QC Coug in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-26-2005, 03:05 PM
  7. Sending macro based e-mail with built-in "Heading" and "Text"
    By Prabha in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-17-2005, 11:06 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