chinel
XLDnaute Impliqué
Salut tout le monde !
voici mon code qui marche bien mai j'ai un message de Microsoft qui me demande <un programme tente d'envoyer atomatique ...> je sais que je dois mettre quelque chose comme <ScreenUpdating = False> mais je sais pas ou le mettre pour ne plus avoir le message
Private Sub CommandButton1_Click()
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
strbody = "Salut Manu" & vbNewLine & vbNewLine & _
TextBox2.Text
On Error Resume Next
With OutMail
.To = "HelpRequest@skynet.be"
.CC = ""
.BCC = ""
.Subject = TextBox3.Value
.Body = strbody
.Send 'or use Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
TextBox2.Value = ""
Courrier.Hide
End Sub
merci de votre aide et bonne année !!!!!!!!!!!!!!
voici mon code qui marche bien mai j'ai un message de Microsoft qui me demande <un programme tente d'envoyer atomatique ...> je sais que je dois mettre quelque chose comme <ScreenUpdating = False> mais je sais pas ou le mettre pour ne plus avoir le message
Private Sub CommandButton1_Click()
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
strbody = "Salut Manu" & vbNewLine & vbNewLine & _
TextBox2.Text
On Error Resume Next
With OutMail
.To = "HelpRequest@skynet.be"
.CC = ""
.BCC = ""
.Subject = TextBox3.Value
.Body = strbody
.Send 'or use Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
TextBox2.Value = ""
Courrier.Hide
End Sub
merci de votre aide et bonne année !!!!!!!!!!!!!!