+ Reply to Thread
Results 1 to 17 of 17

Not running macro on automatic calculation

Hybrid View

  1. #1
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,064

    Re: Not running macro on automatic calculation

    I suggest you replace your checkboxes with Forms controls and then assign one macro to all of them using something like this:
    Sub Mail()
    Dim OutlookApp As Object
    Dim Mess As Object, Recip
    Dim lRow as long
    Dim cb as Checkbox
    set cb = activesheet.checkboxes(application.caller)
    if cb.Value <> 0 then
    lRow = cb.topleftcell.row
    Recip = cells(lRow, "L").Value
    Set OutlookApp = CreateObject("Outlook.Application")
    Set Mess = OutlookApp.CreateItem(olMailItem)
    With Mess
    .Subject = "Task Completed"
    .Body = "Daniel Schofield has completed task" & " " & "-" & " " & Cells(lRow, "C").Value
    .To = Recip
    .Display
    .Send
    End With
    end if
    End Sub
    Everyone who confuses correlation and causation ends up dead.

  2. #2
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Crayford, kent
    MS-Off Ver
    Excel 2013
    Posts
    394

    Re: Not running macro on automatic calculation

    Thats great!!

    It works all except one thing...... When i check a box say in row 7, it is picking up the email address from row 6, and the task from row 6 too, can you add +1 on to the row?

    i.e. Recip = Cells(lRow + 1, "L").Value
    Cells(lRow + 1, "C").Value

  3. #3
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Crayford, kent
    MS-Off Ver
    Excel 2013
    Posts
    394

    Re: Not running macro on automatic calculation

    Dont worry i added the +1 and it works fine thank you very much 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)

Similar Threads

  1. automatic running macro daily using ontime method
    By yellowpower in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-27-2012, 12:04 PM
  2. Automatic calculation and macro's
    By digger713 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-19-2010, 05:57 PM
  3. Automatic Running Macro
    By titanxt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-22-2008, 01:57 AM
  4. Automatic running of Macro for the whole spreadsheet
    By Rob in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-29-2005, 05:05 PM
  5. running macro at automatic time intervals
    By tjb in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-28-2005, 06:06 PM

Tags for this Thread

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