+ Reply to Thread
Results 1 to 6 of 6

Excel validation data to run macro..

  1. #1
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    440

    Excel validation data to run macro..

    Hi,

    I am working with 2 macro, 1 is for english and another one for french.
    They are called. MacroEng, and MacroFre. All they do is format column and rows, and merge data. Nothing too important.
    Now, in a master sheet, I have created a button to click open an excel file. Now, I want to be able to:
    If the selected open file contains in cell A4 : Sommaire, then run MacroFre.
    If the selected open file contains in cell A4: Summary, then run MacroEng.

    This way, I won't need to add 2 separate button for French, or English. But only 1 button can do the job.

    Here is my macro to call an open selected file:
    Please Login or Register  to view this content.
    Please help.

  2. #2
    Registered User
    Join Date
    01-04-2014
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Excel validation data to run macro..

    Please Login or Register  to view this content.
    You don't say if the button is an ActiveX or forms button. The method to call the procedure varies. If it's an ActiveX button, then double click the button and add the procedure body to the Click event, otherwise right-click the button and use 'Assign Macro'

  3. #3
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    440

    Re: Excel validation data to run macro..

    I made a test like:
    Please Login or Register  to view this content.
    not working...

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,763

    Re: Excel validation data to run macro..

    What does not working mean? Are you getting an error message? If so, when you click debug, what line is highlighted?
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    440

    Re: Excel validation data to run macro..

    Sorry, I did not explain the error. There was no error. The only problem is that it runs the macro second call only and not the first call.
    Please Login or Register  to view this content.
    It runs the Call French for both scenario, unless it cannot detect the word Report Summary?

  6. #6
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    440

    Re: Excel validation data to run macro..

    Ah nevermind, I figure it out base on ur help.
    I wrote it as:
    Please Login or Register  to view this content.
    Thanks

+ 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. Replies: 56
    Last Post: 03-11-2014, 03:56 PM
  2. Macro that detects and circles invalid data automatically (Data Validation)
    By dchubbock in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-02-2012, 09:07 AM
  3. Excel Data Validation - Select Multiple Items - Need to Apply Macro to Multiple Rows
    By kristynroll in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-30-2012, 07:44 PM
  4. I need a macro to enter data based on data validation lists.
    By DorothyFan1 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-30-2012, 08:58 AM
  5. Stop Worksheet_Change macro if validation not met in Data Validation
    By Wizz in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-20-2010, 12:26 PM

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