Help With Run Time Error 13

bvt

New Member
Joined
Apr 13, 2011
Messages
1
I can't seem to figure out why I keep getting and Run Time Error 13.
Can any one help.

Sub Batch_In()
Dim Num1 As Variant
Dim Bedrag As Variant
Dim BelegN As Variant
Dim Num2 As Variant
Dim Pastel As Variant
Dim BatchN As Variant
Dim Kolom As Variant
BatchN = "Opbrengs-Apr"
Kolom = 6


For Num1 = 2 To 1392
Sheets("Batch Lys 2011").Select

If Cells(Num1, 3).Value > 0 Then
Pastel = Cells(Num1, 1).Value
BelegN = Cells(Num1, 2).Value
Bedrag = Cells(Num1, Kolom).Value

Sheets("2011").Select

For Num2 = 5 To 25060


If Cells(Num2, 2).Value = Pastel Then
If Cells(Num2, 12).Value = BatchN Then

Cells(Num2, 17).Value = BelegN
Cells(Num2, 18).Value = Pastel
Cells(Num2, 19).Value = Bedrag

Cells(Num2, 17).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 15773696
.TintAndShade = 0
.PatternTintAndShade = 0
End With

Sheets("Batch Lys 2011").Select

Cells(Num1, Kolom).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 15773696
.TintAndShade = 0
.PatternTintAndShade = 0
End With

Else

End If
End If
Next Num2
End If
Next Num1




End Sub
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,224,520
Messages
6,179,267
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top