Hi,
I have a problem with my vba code. I have two similar codes, only the ranges are different. But for the first range excel will not give an error. And for the second range excel give this error:
run-time error '1004':
Method 'Range' of object '_Worksheet' failed.
I don't understand thisbecause both ranges are containing as much multiple ranges in it. The only different is that the first range contains less caracters because a range is like R7:AC7 and the second range is like AG7:AR7.
Can anyone help me with this?
Thanks a lot.
This codes works
same code with this range instead doesn't works:![]()
Please Login or Register to view this content.
Sheet11.Range("AG7:AR7,AG22:AR22,AG37:AR37,AG52:AR52,AG67:AR67,AG82:AR82,AG97:AR97,AG112:AR112,AG127:AR127,AG142:AR142,AG157:AR157,AG172:AR172,AG187:AR187,AG202:AR202,AG217:AR217,AG232:AR232,AG247:AR247,AG262:AR262,AG277:AR277,AG292:AR292,AG307:AR307,AG322:AR322,AG337:AR337,AG352:AR352").SpecialCells(xlCellTypeBlanks).Cells(1).Select
When I choose debug this range is selected in yellow.
Kind regards,
Bookmarks