Ver Mensaje Individual
  #34  
Antiguo 16-06-2008
Avatar de kbaby
kbaby kbaby is offline
Miembro
 
Registrado: oct 2007
Ubicación: Granada
Posts: 178
Reputación: 19
kbaby Va por buen camino
Mi código a quedado así:
Código Delphi [-]
procedure TForm1.Button16Click(Sender: TObject);
var iva,total,a:real;
begin
  try
  iva:=strtofloat(edit21.text);
  total:=strtofloat(edit23.text);
  iva:= (iva / 100)*total;
  a:= total + iva;
  edit23.text:=floattostr(a);
  button16.enabled:=false;
  except
  showmessage('Introduzca un valor válido. Carácteres permitidos 0-9.');
  Exit;
end;
end;

Pero ahora cuando en IVA pongo quince (en vez de 15) no me sale ese mensaje, sino el error que a ti te daba. Algo hago mal...
Responder Con Cita