Notifications
Clear all

[Resolvido] Erro em tempo de execução 13. Tipos incompatíveis

2 Posts
2 Usuários
1 Reactions
1,407 Visualizações
(@vonzuben)
Posts: 549
Prominent Member
Topic starter
 

Como resolver esse erro ?

Na celula C6 está o valor 15,00, pois digita 15.20 e verá o erro.
OBS: Quando você acaba digitando errado, colocando o ponto em vez da vírgula.

Obrigado !

Este tópico foi modificado 4 anos atrás by vonzuben
 
Postado : 19/12/2020 10:36 pm
(@anderson)
Posts: 0
New Member
 

https://www.youtube.com/results?search_query=vba+tratamento+de+erro

 

Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Application.EnableEvents = False
Application.ScreenUpdating = False

Dim Saldo As Double
Dim MsgSaldo As String

Saldo = Range("D2").Value

'--- Balance ---
If Saldo < 0 Then
MsgSaldo = MsgBox("Seu saldo é insuficiente !", vbCritical, "Saldo")
End If

Application.EnableEvents = true
Application.ScreenUpdating = true
End Sub


Este post foi modificado 4 anos atrás 2 vezes por Anderson
 
Postado : 19/12/2020 10:50 pm
vonzuben reacted