+ Reply to Thread
Results 1 to 5 of 5

Automatically activate macro when data is inputed instead of manually activating macro

  1. #1
    Forum Contributor
    Join Date
    07-04-2011
    Location
    London, Ontario
    MS-Off Ver
    Excel 365
    Posts
    119

    Automatically activate macro when data is inputed instead of manually activating macro

    I have a spreadsheet(tool.xls) I have created for my associates which helps them to send emails to different managers in the cities.

    all they do is input the different ID# into column B and then click the command button "run" which activates macro "deter" that transposes the emails with a ";" into cell "output"

    I am trying to eliminate the need to use the "run" command and directly activate the macro as soon as the user inputs data into the column B which will automatically transposes the addresses with the ";"

    I am just trying to figure out if there is a way to do this with vba code in the existing macro or use a macro to activate another macro??
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Automatically activate macro when data is inputed instead of manually activating macr

    Hi,

    I clean up your code a bit along the way:

    ThisWorkbook:
    Please Login or Register  to view this content.
    Module1:
    Please Login or Register  to view this content.
    Test and let me know if you need any tweaks.
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  3. #3
    Forum Contributor
    Join Date
    07-04-2011
    Location
    London, Ontario
    MS-Off Ver
    Excel 365
    Posts
    119

    Re: Automatically activate macro when data is inputed instead of manually activating macr

    Thanks for your response but I am still having problems with the Addin feature--I just cant get it to work ,
    Also
    I tried the code only with this on "this worksheet' but still doesn't work how I want it to
    Please Login or Register  to view this content.
    I just want the 'determacro to run' as soon as the user types the ID# so they dont have to use the Run command.
    Not sure if I am saying this correctly ,please correct me if I am wrong..
    Ok so I figured out this part after doing some more testing.. and I just changed the [CODE]Private Sub Workbook_SheetChange[CODE] to [CODE]Private Sub Workbook_SelectionChange[CODE] and [CODE]If Not Intersect(Target, Worksheets("Main form").Range("B2:B220")) Is Nothing Then Mail[CODE] to the deter macro instead of the mail macro. and it works.

    BUT
    Thanks for your response but I am still having problems with the Addin feature--I just cant get it to work ,
    I am still having issues with it just cant figure it out.
    Last edited by sonny.thind; 03-11-2012 at 06:34 PM.

  4. #4
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Automatically activate macro when data is inputed instead of manually activating macr

    Hi Sonny,

    I don't work much with addins so I can't help much in that area. Maybe someone else with more experience will pick up this second part of the problem. If the thread goes cold then you might want to start a thread with just issue.

    Good luck.

  5. #5
    Forum Contributor
    Join Date
    07-04-2011
    Location
    London, Ontario
    MS-Off Ver
    Excel 365
    Posts
    119

    Re: Automatically activate macro when data is inputed instead of manually activating macr

    No problem I thank you for your help ..

+ 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