Tema: Re: Excel VBA pagalbos
Autorius: Audrius
Data: 2019-01-26 01:28:16
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=windows-1257" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 11.00.9600.18838">
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT size=4 face=Arial>Nor??iau dar papildyti kod?. Kaip beband?au pa?iam 
nesigauna. Tigi turimame kodo gabaliukyje, vienuoliktoje eilut?je,&nbsp;prie? 
?<FONT color=#0000ff>Exit Sub</FONT>? reik?tu korekti?kai&nbsp;?terpti du 
veiksmus, tai:</FONT></DIV>
<DIV><FONT size=4 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial><FONT size=2>Sheets("Archyvas").Protect 
DrawingObjects:=<FONT color=#0000ff>True</FONT>, Contents:=<FONT 
color=#0000ff>True</FONT>, Scenarios:=<FONT 
color=#0000ff>True</FONT><BR>Sheets("Kortel?").Protect DrawingObjects:=<FONT 
color=#0000ff>True</FONT>, Contents:=<FONT color=#0000ff>True</FONT>, 
Scenarios:=<FONT color=#0000ff>True</FONT></FONT></FONT></DIV>
<DIV><FONT color=#0000ff size=4 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=4 face=Arial>?tai ?iame gabaliuke:</FONT></DIV>
<DIV><FONT size=4 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial><FONT color=#0000ff>Sub</FONT> 
paspausti()<BR>Sheets("Kortel?").Unprotect<BR>Sheets("Archyvas").Unprotect<BR>&nbsp;&nbsp;&nbsp; 
<FONT color=#0000ff>Dim</FONT> stulpelis, eilute <FONT color=#0000ff>As 
Integer</FONT><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Sheets("Kortel?").Range("B4:G4").Copy<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Range("A1").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, 
SkipBlanks:=<FONT color=#0000ff>False</FONT>, Transpose:=<FONT 
color=#0000ff>False</FONT><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Data = 
Range("A1")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Sheets("Archyvas").Select<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Data1 = 
Range("A1")<BR>&nbsp;&nbsp;&nbsp; <FONT color=#0000ff>For</FONT> skaicius = 1 
<FONT color=#0000ff>To</FONT> 10000<BR><FONT color=#0000ff>If</FONT> Range("A" 
&amp; skaicius).Value = Data <FONT color=#0000ff>Then</FONT> 
Sheets("Kortel?").Select: Range("A1").ClearContents: Range("B4").Select: MsgBox 
"Tokia data Archyve jau yra": <FONT color=#0000ff>Exit Sub</FONT><BR><FONT 
color=#0000ff>If</FONT> IsEmpty(Cells(skaicius, 2).Value) = <FONT 
color=#0000ff>True Then Exit For</FONT><BR><FONT 
color=#0000ff>Next</FONT></FONT></DIV>
<DIV><FONT color=#0000ff size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=4 face=Arial>D?kui labai.</FONT></DIV>
<DIV><FONT size=4 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=4 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=4 face=Arial>_</FONT></DIV></BODY></HTML>