Sissyfoo
11-20-2005, 05:20 PM
Hello,
I have this script in a form I am building
Sub cmdCreate_Click()
Dim MsgSubject As String
MsgSubject = txtSubject.Text
Set msg = Application.CreateItem(0)
msg.Subject = MsgSubject
msg.Body = "what you want to say in the body of the message"
msg.display
End Sub
but for some reason I cannot get the e-mail message to display on screen. I usually get a message saying that there is a dialog window still open.
If I take out the msg.display line then nothing happens at all when I press the button.
Is there a way around this or, to be more specific, what the hell am I doing wrong? http://vbaexpress.com/forum/images/smilies/102.gif
Cheers,
James
I have this script in a form I am building
Sub cmdCreate_Click()
Dim MsgSubject As String
MsgSubject = txtSubject.Text
Set msg = Application.CreateItem(0)
msg.Subject = MsgSubject
msg.Body = "what you want to say in the body of the message"
msg.display
End Sub
but for some reason I cannot get the e-mail message to display on screen. I usually get a message saying that there is a dialog window still open.
If I take out the msg.display line then nothing happens at all when I press the button.
Is there a way around this or, to be more specific, what the hell am I doing wrong? http://vbaexpress.com/forum/images/smilies/102.gif
Cheers,
James