Skip to main content

AccessTr.neT


Userform İle Tanımlı Adresten Sms Atmak

Userform İle Tanımlı Adresten Sms Atmak

#20
Kod:
Trk = Array("ý", "Ý", "ð", "Ð", "ü", "Ü", "þ", "Þ", "ö", "Ö", "ç", "Ç")
Ing = Array("i", "I", "g", "G", "u", "U", "s", "S", "o", "O", "c", "C")

Abey verdiğiniz linke baktım ve yukardakiler yok.
Alttaki gibi ayarladım kodu deneyn olmazsa yapabileceğim bişey yok sanırrım.
O linkle anladığım Checkbox kullnmışlar sizinki ise Combobox ile ayarlandı.

Private Sub Gönder_Click()
Dim sifre As String

kno = "00000000"
kad = "0000000"
'ksifre = ""
ksifre = Application.InputBox("Þifreyi giriniz", "ÞÝFRE")
orjinator = ComboBox1


If ComboBox2.ListIndex = -1 Then
MsgBox "GÖNDERÝM ÞEKLÝ BOS GECILEMEZ...", vbCritical, "HATA"
Exit Sub
End If

Dim tur As String
tur = ComboBox2.Value
If ComboBox2.Value = "Türkçe" Then tur = "Türkçe"

Dim smsNN As String
smsNN = vbNullString

smsNN = "data=<sms><kno>" & kno & "</kno><kulad>" & kad & "</kulad><sifre>" & ksifre & "</sifre>" & _
"<gonderen>" & orjinator & "</gonderen>" & _
"<telmesajlar>"

smsNN = smsNN + "<telmesaj><tel>" & TextBox18.Value & "</tel><mesaj>" & TextBox19.Value & "</mesaj></telmesaj>"

smsNN = smsNN + "</telmesajlar>" & _
"<tur>" & tur & "</tur></sms>"

Dim oXmlHttp As MSXML2.XMLHTTP60
Set oXmlHttp = New MSXML2.XMLHTTP60
URL = "http://panel.vatansms.com/panel/smsgonderNNpost.php"
oXmlHttp.Open "POST", URL, False
oXmlHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"

Dim bytArguments() As Byte
bytArguments = StrConv(smsNN, vbFromUnicode)
oXmlHttp.send bytArguments

Dim bytRetData() As Byte
bytRetData = oXmlHttp.responseText

Dim cevap As String
cevap = bytRetData

Dim ilkKarakter As String
ilkKarakter = Left$(cevap, 1)
If ilkKarakter = "1" Then
MsgBox "SMS Gönderimi Baþarýyla Tamamlandý.!"
Else
MsgBox "SMS Gönderimi BAÞARISIZ.!"
End If
Set oXmlHttp = Nothing

End Sub

Kısaca bazı yerleri silip alttaki gibi ekledim.

tur = ComboBox2.Value
If ComboBox2.Value = "Türkçe" Then tur = "Türkçe"

Gerçi biraz anlamsız oldu son yazdığım kod.
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Bu Konudaki Yorumlar
RE: Userform İle Tanımlı Adresten Sms Atmak - Yazar: feraz - 09/01/2021, 19:50