Hello,
I want to create a For/Next loop to select a range.
When I try out my code it does not select the way I want.
I expect to select only D6 and M6, but it selects D6 to M6 instead.
When I try this line it works fine, but cannot be used in a For/Next loop.
Is anyone able to tell me what i'm doing wrong here?
Thanx,
Daniel
I want to create a For/Next loop to select a range.
When I try out my code it does not select the way I want.
I expect to select only D6 and M6, but it selects D6 to M6 instead.
Code:
Worksheets("sheet1").Range("D" & 6, "M" & 6).Select
When I try this line it works fine, but cannot be used in a For/Next loop.
Code:
Worksheets("sheet1").Range("D6,M6").Select
Is anyone able to tell me what i'm doing wrong here?
Thanx,
Daniel