MULTIPLO DE "0,25"

USUARIO.EXCLUIDOS 18/03/2005 10:23:11
#73555
Pessoal como eu posso fazer p/ verificar se um numero é multiplo de "0,25".

Desde já obrigado

Raul
USUARIO.EXCLUIDOS 18/03/2005 11:36:46
#73575
WEBMASTER 18/03/2005 12:53:05
#73602
Dim DadoPesq As Double
Dim nMultDE As Double
Dim nCont As Double

DadoPesq = 0.25
nMultDE = 0.25

For nCont = nMultDE To DadoPesq Step nMultDE
'nada faz nada
Next

If nCont - nMultDE = DadoPesq Then
MsgBox "é multiplo !"
Else
MsgBox "Não é multiplo !"
End If
WEBMASTER 18/03/2005 12:53:53
#73603
Dim DadoPesq As Double
Dim nMultDE As Double
Dim nCont As Double

DadoPesq = 2
nMultDE = 0.25

For nCont = nMultDE To DadoPesq Step nMultDE
'nada faz nada
Next

If nCont - nMultDE = DadoPesq Then
MsgBox "é multiplo !"
Else
MsgBox "Não é multiplo !"
End If
USUARIO.EXCLUIDOS 18/03/2005 13:07:42
#73609
Resposta escolhida
Const iNum = 0.25
Dim iAux As Double
iAux = (Text1.Text * 100) Mod (iNum * 100)
If iAux = 0 Then
MsgBox "é multiplo de " & iNum
Else
MsgBox "Não é multiplo de " & iNum
End If
Tópico encerrado , respostas não são mais permitidas