My code here works on 2 of my laptops but when I run it on my 3rd machine. I get a runtime error 13 - type mismatch. The debugger highlights the "Next olApt" line. Thoughts?
Please Login or Register to view this content.
My code here works on 2 of my laptops but when I run it on my 3rd machine. I get a runtime error 13 - type mismatch. The debugger highlights the "Next olApt" line. Thoughts?
Please Login or Register to view this content.
Try change Sheets("Outlook").Range("O2").Text to Sheets("Outlook").Range("O2").Value see if that works.
hum... post your workbook?
I think the problem is because you are deleting olApt.
Try this.
Please Login or Register to view this content.
If posting code please use code tags, see here.
how about add on error statement see if that works. Unfortunately I don't want to touch outlook VBA when I am at work. But give it a try.
Please Login or Register to view this content.
What happens if you declare olApt as Object?
Norie, That did the trick. i declared olApt as an object and it worked. It works for both with my original code for each and the for I you previously recommended.
JieJenn, i also included an error handler. (better safe than sorry)
here is what the final code looks like
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks