- Katılım
- 14 Haziran 2005
- Mesajlar
- 196
- Excel Vers. ve Dili
- Office 365, Office 2019
aşağıdaki makrolu program 2010 ve alt versiyonlarda düzgün çalışıyor. ancak 2013 ve üstünde hata veriyor. Yardım lütfen
Sub Smsform_Tıklat()
Dim Sayfa As Worksheet
Dim Alan As Range
Dim daralan As Range
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
If MsgBox("SMS Formu göndermek istediğinizden eminmisiniz?", vbYesNo + vbInformation) = vbNo Then Exit Sub
saydir = WorksheetFunction.CountIf(Range("A:A"), "<>") + 1
DinamikAlan = "B2:" & "M32" & saydir
Set Alan = Worksheets("SMS").Range(DinamikAlan)
Set Sayfa = ActiveSheet
With Alan
.Parent.Select
Set daralan = ActiveCell
.Select
ActiveWorkbook.EnvelopeVisible = True
With .Parent.MailEnvelope
.Introduction = ""
With .Item
.To = "xxxxx@xxxx.xxx"
.CC = ""
.Subject = "SMS Gönderme Talep Formu"
.bcc = ""
.Send
End With
End With
daralan.Select
End With
Sayfa.Select
HATA:
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
MsgBox "SMS Talep Formu xxxxxxxxx e-posta adresine gönderilmiştir"
End Sub
Sub Smsform_Tıklat()
Dim Sayfa As Worksheet
Dim Alan As Range
Dim daralan As Range
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
If MsgBox("SMS Formu göndermek istediğinizden eminmisiniz?", vbYesNo + vbInformation) = vbNo Then Exit Sub
saydir = WorksheetFunction.CountIf(Range("A:A"), "<>") + 1
DinamikAlan = "B2:" & "M32" & saydir
Set Alan = Worksheets("SMS").Range(DinamikAlan)
Set Sayfa = ActiveSheet
With Alan
.Parent.Select
Set daralan = ActiveCell
.Select
ActiveWorkbook.EnvelopeVisible = True
With .Parent.MailEnvelope
.Introduction = ""
With .Item
.To = "xxxxx@xxxx.xxx"
.CC = ""
.Subject = "SMS Gönderme Talep Formu"
.bcc = ""
.Send
End With
End With
daralan.Select
End With
Sayfa.Select
HATA:
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
MsgBox "SMS Talep Formu xxxxxxxxx e-posta adresine gönderilmiştir"
End Sub
