Я новичок в VBA, и я пытаюсь запустить код. Я просто получаю ошибку времени выполнения 13 - несоответствие типов
Код следующий:
Sub Range_Copy_Examples()
Worksheets("Luni").Range("A1:A800").Value = Worksheets("Rout").Range("A1:A800").Value
Worksheets("Luni").Range("B1:B800").Value = Worksheets("Rout").Range("B1:B800").Value
Worksheets("Luni").Range("C1:C800").Value = Worksheets("Rout").Range("C1:C800").Value
Worksheets("Luni").Range("D1:D800").Value = Worksheets("Rout").Range("D1:D800").Value
Worksheets("Luni").Range("E1:E800").Value = Worksheets("Rout").Range("E1:E800").Value
Worksheets("Luni").Range("F1:F800").Value = Worksheets("Rout").Range("F1:F800").Value
Worksheets("Luni").Range("G1:G800").Value = Worksheets("Rout").Range("G1:G800").Value
Worksheets("Luni").Range("H1:H800").Value = Worksheets("Rout").Range("H1:H800").Value
Workbooks("Plan livrari 2018 Landscape - final.xlsm").Worksheets("Rout").Range("A1:A800").Copy
Workbooks("Plan livrari 2018 Landscape - final.xlsm").Worksheets("Luni").Range("A1:A800").PasteSpecial Paste:=xlPasteFormats
Workbooks("Plan livrari 2018 Landscape - final.xlsm").Worksheets("Rout").Range("B1:B800").Copy
Workbooks("Plan livrari 2018 Landscape - final.xlsm").Worksheets("Luni").Range("B1:B800").PasteSpecial Paste:=xlPasteFormats
Workbooks("Plan livrari 2018 Landscape - final.xlsm").Worksheets("Rout").Range("C1:C800").Copy
Workbooks("Plan livrari 2018 Landscape - final.xlsm").Worksheets("Luni").Range("C1:C800").PasteSpecial Paste:=xlPasteFormats
Workbooks("Plan livrari 2018 Landscape - final.xlsm").Worksheets("Rout").Range("D1:D800").Copy
Workbooks("Plan livrari 2018 Landscape - final.xlsm").Worksheets("Luni").Range("D1:D800").PasteSpecial Paste:=xlPasteFormats
Workbooks("Plan livrari 2018 Landscape - final.xlsm").Worksheets("Rout").Range("E1:E800").Copy
Workbooks("Plan livrari 2018 Landscape - final.xlsm").Worksheets("Luni").Range("E1:E800").PasteSpecial Paste:=xlPasteFormats
Workbooks("Plan livrari 2018 Landscape - final.xlsm").Worksheets("Rout").Range("F1:F800").Copy
Workbooks("Plan livrari 2018 Landscape - final.xlsm").Worksheets("Luni").Range("F1:F800").PasteSpecial Paste:=xlPasteFormats
Workbooks("Plan livrari 2018 Landscape - final.xlsm").Worksheets("Rout").Range("G1:G800").Copy
Workbooks("Plan livrari 2018 Landscape - final.xlsm").Worksheets("Luni").Range("G1:G800").PasteSpecial Paste:=xlPasteFormats
Workbooks("Plan livrari 2018 Landscape - final.xlsm").Worksheets("Rout").Range("H1:H800").Copy
Workbooks("Plan livrari 2018 Landscape - final.xlsm").Worksheets("Luni").Range("H1:H800").PasteSpecial Paste:=xlPasteFormats
End sub
If Target = Range("F4") Then
If ActiveSheet.Range("F4").Value <> "" Then
ActiveSheet.Shapes("CheckBox2").Visible = True
Else
ActiveSheet.Shapes("CheckBox2").Visible = False
End If
End If
If Target = Range("F5") Then
If ActiveSheet.Range("F5").Value <> "" Then
ActiveSheet.Shapes("CheckBox2").Visible = True
Else
ActiveSheet.Shapes("CheckBox2").Visible = False
End If
End If
If Target = Range("F6") Then
If ActiveSheet.Range("F6").Value <> "" Then
ActiveSheet.Shapes("CheckBox3").Visible = True
Else
ActiveSheet.Shapes("CheckBox3").Visible = False
End If
End sub
Я получаю ошибку времени выполнения 13 - несоответствие типов и отладка
If Target = Range("F4") Then