+ Reply to Thread
Results 1 to 8 of 8

Solver Macro triggered if condtion reached

  1. #1
    Forum Contributor
    Join Date
    04-19-2009
    Location
    Toulouse, France
    MS-Off Ver
    Excel 2010
    Posts
    130

    Solver Macro triggered if condtion reached

    Hi all still struggling with VBA. I would like to run/trigger the following code (see below) if cell D2 which is a countdown clock is 00:01:05. I have played around with event change etc without success. I do however have a problem with the original code as i get a compile error sub/function not defined with the code below.
    Please Login or Register  to view this content.
    Sorry if this is a double post (i dont think so) however after originally posting it i could not find it under my posts. Any help greatly appreciated

    Thankyou
    Dan

  2. #2
    Forum Contributor
    Join Date
    04-19-2009
    Location
    Toulouse, France
    MS-Off Ver
    Excel 2010
    Posts
    130

    Re: Solver Macro triggered if condtion reached

    I resolved the compile problem, though still looking for code that will trigger macro for the above code. I tried the code below however when i run it it just brings up my list of macros and nothing happens. Any ideas. If the above is in any way vague please let me know.

    Please Login or Register  to view this content.
    Regards
    Dan

  3. #3
    Forum Contributor
    Join Date
    04-19-2009
    Location
    Toulouse, France
    MS-Off Ver
    Excel 2010
    Posts
    130

    Re: Solver Macro triggered if condtion reached

    When i run this (see below) i am getting a runtime error 1004 method range of object... failed. Any ideas
    Please Login or Register  to view this content.
    Thanks
    Dan

  4. #4
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Solver Macro triggered if condtion reached

    Try this:

    Please Login or Register  to view this content.
    If you liked my solution, please click on the Star -- to add to my reputation

    If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.

  5. #5
    Forum Contributor
    Join Date
    04-19-2009
    Location
    Toulouse, France
    MS-Off Ver
    Excel 2010
    Posts
    130

    Re: Solver Macro triggered if condtion reached

    thanks for the reply Dgagnon. I tried your suggestion though it is saying expected list or seperator...

    Regards
    Dan

  6. #6
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Solver Macro triggered if condtion reached

    sorry im not fimilar with solver in VBA, but it could be caused by the macro name being a reserved word, try changing it to "SolverMacro"

  7. #7
    Forum Contributor
    Join Date
    04-19-2009
    Location
    Toulouse, France
    MS-Off Ver
    Excel 2010
    Posts
    130

    Re: Solver Macro triggered if condtion reached

    Thanks for the reply
    Tried as you suggested now i when i run macro within visual basic window it brings up a list of all my stored macros and does nothing
    else. The Sub Solver part of the code works well if i manually run it just can't seem to get it to trigger automatically when aforementioned condition is reached. The result of just showing a list of stored macros (of which Mont (the new name) is a part) may be a clue to what i am doing wrong. Any ideas much appreciated.

    Thanks again

  8. #8
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Solver Macro triggered if condtion reached

    Try it like this

    Please Login or Register  to view this content.

+ 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