bonjour
apparement une erreure c'est glisse dans ma macro
pouvez vous me la corriger? merci
voila le code qui se deroule mais ne m envoi pas de mail
Private Sub CommandButton2_Click()
Unload Me
End Sub
Private Sub TextBox1_Change()
TextBox1 = LCase(TextBox1)
End Sub
Private Sub CommandButton1_Click()
Dim Arobase As String
Dim Point As String
Dim Vide As Variant
If TextBox1.Value = "" Then
MsgBox "Vous avez oublié de rentrer une adresse !", vbInformation, ""
TextBox1.SetFocus
Exit Sub
End If
MailAdresse = TextBox1.Value
MailSubject = TextBox2.Value
'Textbody = TextBox3.Value
On Error GoTo BadMail
Arobase = Application.WorksheetFunction.Search("@", MailAdresse, 1)
Point = Application.WorksheetFunction.Search(".", MailAdresse, 1)
On Error GoTo Suite
Vide = Application.WorksheetFunction.Search(" ", MailAdresse, 1)
Suite:
If Vide <> "" Then GoTo BadMail
Call SendWorkBook
'SortirUserForm
Exit Sub
BadMail:
MsgBox "Adresse Email incorrecte !", vbInformation, ""
TextBox1.SetFocus
End Sub
Private Sub UserForm_Initialize()
Me.Caption = " ENVOI DU CLASSEUR"
End Sub
Sub SendWorkBook()
Set objMessage = CreateObject("CDO.Message")
With objMessage
.Subject = TextBox2.Value
.To = TextBox1.Value
.CC = TextBox4.Value
.TextBody = TextBox3.Value
End With
Set objMessage = Nothing
MsgBox "Votre classeur a bien été envoyé", vbInformation, ""
Unload Me
End Sub
peux tu voir pourquoi?
MERCI
7 résultats trouvés pour cartus
correction macro - Lun 2 Mar - 9:06
macro pour envoyer automatiquement un mail - Jeu 26 Fév - 15:00
voila le code qui se deroule mais ne m envoi pas de mail
Private Sub CommandButton2_Click()
Unload Me
End Sub
Private Sub TextBox1_Change()
TextBox1 = LCase(TextBox1)
End Sub
Private Sub CommandButton1_Click()
Dim Arobase As String
Dim Point As String
Dim Vide As Variant
If TextBox1.Value = "" Then
MsgBox "Vous avez oublié de rentrer une adresse !", vbInformation, ""
TextBox1.SetFocus
Exit Sub
End If
MailAdresse = TextBox1.Value
MailSubject = TextBox2.Value
'Textbody = TextBox3.Value
On Error GoTo BadMail
Arobase = Application.WorksheetFunction.Search("@", MailAdresse, 1)
Point = Application.WorksheetFunction.Search(".", MailAdresse, 1)
On Error GoTo Suite
Vide = Application.WorksheetFunction.Search(" ", MailAdresse, 1)
Suite:
If Vide <> "" Then GoTo BadMail
Call SendWorkBook
'SortirUserForm
Exit Sub
BadMail:
MsgBox "Adresse Email incorrecte !", vbInformation, ""
TextBox1.SetFocus
End Sub
Private Sub UserForm_Initialize()
Me.Caption = " ENVOI DU CLASSEUR"
End Sub
Sub SendWorkBook()
Set objMessage = CreateObject("CDO.Message")
With objMessage
.Subject = TextBox2.Value
.To = TextBox1.Value
.CC = TextBox4.Value
.TextBody = TextBox3.Value
End With
Set objMessage = Nothing
MsgBox "Votre classeur a bien été envoyé", vbInformation, ""
Unload Me
End Sub
peux tu voir pourquoi?
MERCI
macro pour envoyer automatiquement un mail - Mer 25 Fév - 16:03
bon alors ca marche bien sur la feuill aucun souci
mais je ne recois pas de mail??????
merci
macro pour envoyer automatiquement un mail - Mer 25 Fév - 13:49
ca ne marche pas quand je rentre l adresse et ok ca bug
ps: est-il possible de rentrer mon adresse car le mail sera toujours pour moi ...
merci
macro pour envoyer automatiquement un mail - Mer 25 Fév - 10:40
bonjour
alors voici une petite macro a creer :
voila ce que je souhaiterai faire sur une feuille exel :
j'ai une liste qui sera mise à jour par plusieurs personnes
afin que je sois au courant je souhaiterai ajouter sur cette feuille un bouton sur lequel les personnes cliquerai et automatiquement ca m enverrai un message du style: mise à jour de la liste effectuée.
voila j'espere que quelqu un pourra m'aider
merci ![]()

