Return to MS Excel

  • Thread starter Thread starter Poh
  • Start date Start date
P

Poh

Hi!

Question: After manage to send email from MS Excel using
the following code:

ActiveSheet.Range("A1:J9").Select
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Item.To = strTo
.Item.Subject = strSubject
.Item.Send
End With

But focus of the screen was 'stuck' in MS Outlook, how
can i get the focus back to MS Excel using VB?

Thanks
 
Back
Top