hücreyi telegrama atmak

Katılım
7 Mart 2022
Mesajlar
3
Excel Vers. ve Dili
2019 ingilizce
Merhaba, sürekli yenilenen hücrede veri oluştukça telegram botumdan mesaj gelmesi için visual basic koduna ihtiyacım var. Elimde sadecce mesaj gönderme kodu var bunu hücre doldukça otomatik mesaj gönderecek şekilde ayarlamak istiyorum.





Sub SendMessage()

Dim objRequest As Object
Dim strChatId As String
Dim strMessage As String
Dim strPostData As String
Dim strResponse As String

strChatId = Value
strMessage = Value
strPostData = "chat_id=" & strChatId & "&text=" & strMessage

Set objRequest = CreateObject("MSXML2.XMLHTTP")
With objRequest
.Open "POST", "https://api.telegram.org/bot448817313:AAEwx3JKqx7ORbyUxlWMlYRzZUXxSeF_dhA/sendMessage?", False
.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
.send (strPostData)
GetSessionId = .responseText
MsgBox GetSessionId
End With

End Sub
 
Son düzenleme:
Katılım
7 Mart 2022
Mesajlar
3
Excel Vers. ve Dili
2019 ingilizce
up
 
Üst