Ayuda! showmessage no aparece cdo me salgo del rango... que hago mal?
Publicado por J N (2 intervenciones) el 22/07/2020 00:30:30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
procedure TForm1.btnModificarClick(Sender: TObject);
var
fil,col:integer;
nronuevo,nronuevo2,nro:string;
col2,fil2:string;
begin
col2:= inputbox('Ingrese','Seleccione columna A, B, C, D, E ','');
fil2:= inputbox('Ingrese','Seleccione Fila desde 1 a 5','');
if (col2 = 'A') or (col2 = 'a') or (col2 = 'B') or (col2 = 'b') or (col2 = 'C') or (col2 = 'c') or (col2 = 'D') or (col2 = 'd') or (col2 = 'E') or (col2 = 'e')then
begin
case col2 of
'A': col2:= '1';
'a': col2:= '1';
'B': col2:= '2';
'b': col2:= '2';
'C': col2:= '3';
'c': col2:= '3';
'D': col2:= '4';
'd': col2:= '4';
'E': col2:= '5';
'e': col2:= '5'
else
showmessage ('Columna seleccionada incorrecta');
end;
if (fil2 = '1') or (fil2 = '2') or (fil2 = '3') or (fil2 = '4') or (fil2 = '5')then
begin
case fil2 of
'1': fil2:= '1';
'2': fil2:= '2';
'3': fil2:= '3';
'4': fil2:= '4';
'5': fil2:= '5'
else
showmessage ('Fila seleccionada incorrecta');
end;
for fil:= 1 to 5 do
for col:= 1 to 5 do
if (fil= strtoint (fil2)) and (col= strtoint (col2)) then
begin
nronuevo2:= inputbox('Ingrese','nuevo número','');
Grilla.Cells [col,fil]:= nronuevo2 ;
m[fil,col] := strtoint (nronuevo2) ;
listBox1.items.clear();
lblpromedio.caption:='';
btnmostrar.enabled:=false;
btndebajodelpromedio.enabled:=false;
end;
end;
end;
end;
Valora esta pregunta


0