VBA code string with more then 912 characters

Closed
Trowa - Jul 21, 2009 at 07:01 AM
 Guy - Aug 10, 2009 at 01:07 AM
Hello,

I have created a VBA code with a string of character exceeding the number of 912, thus getting the error 1004.

The code looks like this:
Sheets("Verlofoverzicht").Range("M8:N8,M9:N9,M10:N10,M11:N11,......,M199:N199,M200:N200").Merge

What do I need to do to make my code work.

I already checked the support site of microsoft, but can't find a suitable answer.

Can anyone help me out?

Best regards,
Wiebe
Related:

1 response

Use this

Sub test()
For i = 8 To 200
Range(Cells(i, 13), Cells(i, 14)).Merge
Next i
End Sub
0