+ Reply to Thread
Results 1 to 6 of 6

Macro to Add Tasks to outlook -

  1. #1
    Forum Contributor
    Join Date
    01-21-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    258

    Macro to Add Tasks to outlook -

    Hello fellas!

    I'm trying to write a simple macro for a friend that takes a contract title(Column A), and a revision date(Column B) for that contract and creates a task in outlook to remind him when the contracts due for revision. the Macro should also add a date to column C when the reminder is set, this is to prevent duplicate tasks being created.

    I'll attach a really simple worksheet that I've been testing my code on.

    My problem is that when I try to add the date to column C for the single row, it add's it to all the row's and therefor only creates one task.

    It's probably a really simple fix, and apologies if my code seems a little whacky or stupid. just new to this whole VB thing!

    Please Login or Register  to view this content.
    Many Thanks!

    R
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    01-21-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    258

    Re: Macro to Add Tasks to outlook -

    If anyone has time to take a look at this, I think it's a problem due to having the second 'with' function.

    Not entirely sure. If theres a better way to lay this out that someone could reccomend?

  3. #3
    Forum Contributor
    Join Date
    01-21-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    258

    Re: Macro to Add Tasks to outlook -

    Anyone?

    The code is meant to check if the two variables are at certain conditions and if they are, then it executes the second with function. It seems like it's not understanding that it's meant check each row for this.

    Which I don't understand because I use the coding for that bit in another macro and it works fine.

    Any Ideas?

  4. #4
    Forum Contributor
    Join Date
    01-21-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    258

    Re: Macro to Add Tasks to outlook -

    Bump - If anyone has any idea's - doesnt have to be right, but just something else I can try, because I'm honestly stumped on how to solve this issue.

  5. #5
    Forum Contributor
    Join Date
    01-21-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    258

    Re: Macro to Add Tasks to outlook -

    Bump - Sorry, I still havent sorted this yet and would really appreciate the help. Thanks

  6. #6
    Forum Contributor
    Join Date
    01-21-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    258

    Re: Macro to Add Tasks to outlook -

    Right,

    I'm going to mark this as solved.

    Changed my code up a little bit and went for appointments instead of tasks, Though it would be simple to change the code to work for tasks instead.

    Here's what I'm using

    Please Login or Register  to view this content.
    In case anyone else wants to steal it for anything. I stole part of it from another thread. I think this code works better because you have to set the range on the other code for it to loop, and if you have any blank rows in the range then it creates appointments for years ago. Found that out the hard way :P

    Anyway, hope this helps anyone searching for this in the future!

+ 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