Run-time error '1004' - VB
Формулировка задачи:
Здравствуйте!
В макросе по поиску и сравнению ячеек ругается на строчку
Run-time error '1004':Application-defined or object defined error
Текст макроса:
В макросе по поиску и сравнению ячеек ругается на строчку
ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value
Текст макроса:
Attribute VB_Name = compare5() k k = Target = ThisWorkbook.Sheets().UsedRange.Columns().Cells cc Target a = cc.Rows.Row flag = x = ThisWorkbook.Sheets().Columns().Find(ThisWorkbook.Sheets().Cells(a, ), _ LookIn:=xlValues, LookAt:=xlWhole, MatchCase:=True) по -ой колонке значения из -ой колонки -го листа x goout iFirstAddress = x.Address Cells(a, ).Value = Cells(x.Rows.Row, ).Value flag = x1 Range x1 = Range(Cells(a, ), Cells(a, )).Find(, LookAt:=xlWhole) x1 nc1 = x1..Value x2 Range x2 = Range(Cells(a, ), Cells(a, )).Find(, LookAt:=xlWhole) x2 nc2 = x2..Value x3 Range x3 = Range(Cells(a, ), Cells(a, )).Find(, LookAt:=xlWhole) x3 nc3 = x3..Value x4 Range x4 = Range(Cells(a, ), Cells(a, )).Find(, LookAt:=xlWhole) x4 nc4 = x4..Value x5 Range x5 = Range(Cells(a, ), Cells(a, )).Find(, LookAt:=xlWhole) x5 nc5 = x5..Value x6 Range x6 = Range(Cells(a, ), Cells(a, )).Find(, LookAt:=xlWhole) x6 nc6 = x6..Value x7 Range x7 = Range(Cells(a, ), Cells(a, )).Find(, LookAt:=xlWhole) x7 nc7 = x7..Value x8 Range x8 = Range(Cells(a, ), Cells(a, )).Find(, LookAt:=xlWhole) x8 nc8 = x8..Value x9 Range x9 = Range(Cells(a, ), Cells(a, )).Find(, LookAt:=xlWhole) x9 nc9 = x9..Value x10 Range x10 = Range(Cells(a, ), Cells(a, )).Find(, LookAt:=xlWhole) x10 nc10 = x10..Value x11 Range x11 = Range(Cells(a, ), Cells(a, )).Find(, LookAt:=xlWhole) x11 nc11 = x11..Value x12 Range x12 = Range(Cells(a, ), Cells(a, )).Find(, LookAt:=xlWhole) x12 nc12 = x12..Value y1 Range y1 = Range(Cells(x.Rows.Row, ), Cells(a, )).Find(, LookAt:=xlWhole) y1 ns1 = y1..Value y2 Range y2 = Range(Cells(x.Rows.Row, ), Cells(a, )).Find(, LookAt:=xlWhole) y2 ns2 = y2..Value y3 Range y3 = Range(Cells(x.Rows.Row, ), Cells(a, )).Find(, LookAt:=xlWhole) y3 ns3 = y3..Value y4 Range y4 = Range(Cells(x.Rows.Row, ), Cells(a, )).Find(, LookAt:=xlWhole) y4 ns4 = y4..Value y5 Range y5 = Range(Cells(x.Rows.Row, ), Cells(a, )).Find(, LookAt:=xlWhole) y5 ns5 = y5..Value y6 Range y6 = Range(Cells(x.Rows.Row, ), Cells(a, )).Find(, LookAt:=xlWhole) y6 ns1 = y6..Value y7 Range y7 = Range(Cells(x.Rows.Row, ), Cells(a, )).Find(, LookAt:=xlWhole) y7 ns7 = y7..Value y8 Range y8 = Range(Cells(x.Rows.Row, ), Cells(a, )).Find(, LookAt:=xlWhole) y8 ns8 = y8..Value y9 Range y9 = Range(Cells(x.Rows.Row, ), Cells(a, )).Find(, LookAt:=xlWhole) y9 ns9 = y9..Value y10 Range y10 = Range(Cells(x.Rows.Row, ), Cells(a, )).Find(, LookAt:=xlWhole) y10 ns1 = y10..Value y11 Range y11 = Range(Cells(x.Rows.Row, ), Cells(a, )).Find(, LookAt:=xlWhole) y11 ns11 = y11..Value y12 Range y12 = Range(Cells(x.Rows.Row, ), Cells(a, )).Find(, LookAt:=xlWhole) y12 ns12 = y12..Value ThisWorkbook.Sheets().Activate nc1 = ns1 ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Range( & Str(k)).Value = nc1 k = k + nc2 = ns2 ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Range( & Str(k)).Value = nc2 k = k + nc3 = ns3 ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Range( & Str(k)).Value = nc3 k = k + nc4 = ns4 ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Range( & Str(k)).Value = nc4 k = k + nc5 = ns5 ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Range( & Str(k)).Value = nc5 k = k + nc6 = ns6 ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Range( & Str(k)).Value = nc6 k = k + nc7 = ns7 ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Range( & Str(k)).Value = nc7 k = k + nc8 = ns8 ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Range( & Str(k)).Value = nc8 k = k + nc9 = ns9 ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Range( & Str(k)).Value = nc9 k = k + nc10 = ns10 ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Range( & Str(k)).Value = nc10 k = k + nc11 = ns11 ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Range( & Str(k)).Value = nc11 k = k + nc12 = ns12 ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Range( & Str(k)).Value = nc12 k = k + goout x = ThisWorkbook.Sheets().Columns().FindNext(x) iSecondAddress = x.Address Cells(a, ).Value = Cells(x.Rows.Row, ).Value flag = z1 Range z1 = Range(Cells(a, ), Cells(a, )).Find(, LookAt:=xlWhole) z1 nc1 = x1..Value z2 Range z2 = Range(Cells(a, ), Cells(a, )).Find(, LookAt:=xlWhole) z2 nc2 = x2..Value z3 Range z3 = Range(Cells(a, ), Cells(a, )).Find(, LookAt:=xlWhole) z3 nc3 = x3..Value z4 Range z4 = Range(Cells(a, ), Cells(a, )).Find(, LookAt:=xlWhole) z4 nc4 = x4..Value z5 Range z5 = Range(Cells(a, ), Cells(a, )).Find(, LookAt:=xlWhole) z5 nc5 = x5..Value z6 Range z6 = Range(Cells(a, ), Cells(a, )).Find(, LookAt:=xlWhole) z6 nc6 = x6..Value z7 Range z7 = Range(Cells(a, ), Cells(a, )).Find(, LookAt:=xlWhole) z7 nc7 = x7..Value z8 Range z8 = Range(Cells(a, ), Cells(a, )).Find(, LookAt:=xlWhole) z8 nc8 = x8..Value z9 Range z9 = Range(Cells(a, ), Cells(a, )).Find(, LookAt:=xlWhole) z9 nc9 = x9..Value z10 Range z10 = Range(Cells(a, ), Cells(a, )).Find(, LookAt:=xlWhole) z10 nc10 = x10..Value z11 Range z11 = Range(Cells(a, ), Cells(a, )).Find(, LookAt:=xlWhole) z11 nc11 = x11..Value z12 Range z12 = Range(Cells(a, ), Cells(a, )).Find(, LookAt:=xlWhole) x12 nc12 = x12..Value v1 Range v1 = Range(Cells(x.Rows.Row, ), Cells(a, )).Find(, LookAt:=xlWhole) v1 ns1 = y1..Value v2 Range v2 = Range(Cells(x.Rows.Row, ), Cells(a, )).Find(, LookAt:=xlWhole) v2 ns2 = y2..Value v3 Range v3 = Range(Cells(x.Rows.Row, ), Cells(a, )).Find(, LookAt:=xlWhole) v3 ns3 = y3..Value v4 Range v4 = Range(Cells(x.Rows.Row, ), Cells(a, )).Find(, LookAt:=xlWhole) v4 ns4 = y4..Value v5 Range v5 = Range(Cells(x.Rows.Row, ), Cells(a, )).Find(, LookAt:=xlWhole) v5 ns5 = y5..Value v6 Range v6 = Range(Cells(x.Rows.Row, ), Cells(a, )).Find(, LookAt:=xlWhole) v6 ns1 = y6..Value v7 Range v7 = Range(Cells(x.Rows.Row, ), Cells(a, )).Find(, LookAt:=xlWhole) v7 ns7 = y7..Value v8 Range v8 = Range(Cells(x.Rows.Row, ), Cells(a, )).Find(, LookAt:=xlWhole) v8 ns8 = y8..Value v9 Range v9 = Range(Cells(x.Rows.Row, ), Cells(a, )).Find(, LookAt:=xlWhole) v9 ns9 = y9..Value v10 Range v10 = Range(Cells(x.Rows.Row, ), Cells(a, )).Find(, LookAt:=xlWhole) v10 ns1 = y10..Value v11 Range v11 = Range(Cells(x.Rows.Row, ), Cells(a, )).Find(, LookAt:=xlWhole) v11 ns11 = y11..Value v12 Range v12 = Range(Cells(x.Rows.Row, ), Cells(a, )).Find(, LookAt:=xlWhole) v12 ns12 = y12..Value nc1 = ns1 ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Range( & Str(k)).Value = nc1 k = k + nc2 = ns2 ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Range( & Str(k)).Value = nc2 k = k + nc3 = ns3 ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Range( & Str(k)).Value = nc3 k = k + nc4 = ns4 ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Range( & Str(k)).Value = nc4 k = k + nc5 = ns5 ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Range( & Str(k)).Value = nc5 k = k + nc6 = ns6 ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Range( & Str(k)).Value = nc6 k = k + nc7 = ns7 ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Range( & Str(k)).Value = nc7 k = k + nc8 = ns8 ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Range( & Str(k)).Value = nc8 k = k + nc9 = ns9 ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Range( & Str(k)).Value = nc9 k = k + nc10 = ns10 ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Range( & Str(k)).Value = nc10 k = k + nc11 = ns11 ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Range( & Str(k)).Value = nc11 k = k + nc12 = ns12 ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Cells(a, ).Value ThisWorkbook.Sheets().Range( & Str(k)).Value = ThisWorkbook.Sheets().Range( & Str(k)).Value = nc12 k = k + iFirstAddress <> iSecondAddress goout:
Решение задачи: «Run-time error '1004'»
textual
Листинг программы
<font color="blue">Sub</font> compare6() <font color="blue">Dim</font> k <font color="blue">As</font> <font color="blue">Integer</font> k = <font color="darkblue"><b>1</b></font> MsgBox <font color="teal">"A"</font> & Str(k) MsgBox <font color="teal">"A"</font> & CStr(k) <font color="blue">End</font> <font color="blue">Sub</font>
ИИ поможет Вам:
- решить любую задачу по программированию
- объяснить код
- расставить комментарии в коде
- и т.д