Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 153
Default Cannot reactivate workbook after sending email in VBA

Hi,

I've got code running/working that does its thing and then sends an
email to a designated recipient. Of course, there is a warning
message telling the user that a program is trying to send an email,
and it asks for approval. That's fine, and the user simply clicks on
Yes. The problem is the remaining code. I've got it set to
re-activate the Excel workbook, but the code only works when Outlook
is not open. When my Outlook is open, the active window switches from
the Excel workbook to Outlook when the email is going out, then the
warning message, and then it stays on Outlook. If I manually click
back over to my Excel workbook, I can see the message box I have
programmed in. This all works fine when Outlook is closed. Currently,
my code is:

Windows("PDF Portal.xls").Activate.

Would this work if I used

Workbook("PDF Portal.xls").Activate?

Thanks for any help.

Frank
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending Workbook to an email address. Panagiotis Atmatzidis Excel Discussion (Misc queries) 4 April 21st 07 12:22 AM
Sending an email from Excel attaching the workbook they are in John Excel Programming 10 October 24th 06 09:54 PM
Sending an email on workbook save matpj[_31_] Excel Programming 5 January 17th 06 04:57 PM
Sending email WITHOUT attaching a workbook? Kobayashi[_5_] Excel Programming 2 September 25th 03 02:20 PM
sending a workbook by email to multiple recipients keepitcool Excel Programming 6 September 4th 03 11:56 AM


All times are GMT +1. The time now is 12:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"