Este fórum está sendo desativado

Depois de 9 anos, este fórum será desativado. Mas calma.... estamos migrando para uma comunidade no DISCORD. Junte-se a nós.

ENTRAR PARA DISCORD

Tópicos relacionados a códigos VBA, gravação de macros, etc.
  • Avatar do usuário
Avatar do usuário
Por mdiego
Posts Avatar
#73325
Prezados, Boa tarde!

Eu tô tentando fazer uma macro para executar um código para enviar mensagem para o telegram...
Exemplo se na célula e2 > = 10 então, execute o código a seguir.

Sub sendTelegram(botToken, chatID, msgTelegram)
Dim xmlhttp As Object
Set xmlhttp = CreateObject("MSXML2.serverXMLHTTP")

With New XMLHTTP60
.Open "POST", "https://api.telegram.org/bot" & botToken & _
"/sendMessage?chat_id=" & chatID & _
"&text=" & msgTelegram & _
"&parse_mode=html"
.send
End With
End Sub

Só que acontece o seguinte, eu usei o calculate e meu bot entrou em looping mandando mensagem a cada 1 segundo. Alguém poderia me ajudar com o código ou alguém tem algo parecido por favor. Se possível anexar uma tabela de exemplo

Grato desde de já.
Por osvaldomp
#73327
E este outro tópico seu, já resolveu ?

Se sim, nos conte qual foi a solução, assim poderá ajudar outros.

viewtopic.php?p=73311#p73311
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]

Estamos migrando para uma comunidade no Discord