+ Reply to Thread
Results 1 to 3 of 3

Run Macro when clicking on a button in Menu Comand under Add-Ins

  1. #1
    Registered User
    Join Date
    06-05-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Excel 2007
    Posts
    4

    Run Macro when clicking on a button in Menu Comand under Add-Ins

    Hello you all,

    I hope you'll be able to help me out here. I'm new to VBA so... I want the macros to validate the entries and when everything is correct to give out the number of them.

    Here is my problem:

    But it only validates them once, if I run the Addin again it would skip the first macros (validation part) and start counting the number of entries. But I need it to check again after the values have been changed.

    I believe it is due to the fact I just initialize this on opening of the workbook.

    How could I force the macros to be run from the very beggining again?

    I didn't coppy a code part here. But I'll uploade a sample workbook in xlsm format, the code will be saved as an add-in. So the validation and count parts are called by the button - 'Run'. (The other ones are just to allow the user to call a specific part of the code).

    Best regards,
    Anitra

    P.S. I hope this is clear, if not let me know Thanks to Tony, sorry hoped the add-in will be saved with the file.
    Attached Files Attached Files
    Last edited by anitra; 06-07-2013 at 08:56 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    10-26-2008
    Location
    Birmingham, UK
    MS-Off Ver
    All versions up to 2010
    Posts
    1,025

    Re: Run Macro when clicking on a button in Menu Comand under Add-Ins

    Hi
    Without a full copy of the Workbook (with macros) we have no way of identifying what your issue is.
    Tony

  3. #3
    Registered User
    Join Date
    06-05-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Run Macro when clicking on a button in Menu Comand under Add-Ins

    Incorrect thred name, the problem was different (well the solution is still in here :D ). The way of initializing the macros works as in the file above. My way of finding invalid entries for date and time was incorrect, cause it would just check the formating. And if 'zzzzz' is formated as date it, thought everything is perfect. Here is also the adjusted version, anyone feels like checking it out.

    Thanks anyway to you all
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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