G
Guest
Hi,
I have multiple lines of code in a macro of the following
format. As you can see some of the cell references
increment by a single digit (up to 103) and everything
else remains the same:
Sheet22.Cells((Sheet1.Cells(502, 11) + Sheet1.Cells(506,
2)), 1) = Sheet24.Cells(4, 1)
Sheet22.Cells((Sheet1.Cells(502, 11) + Sheet1.Cells
(506, 2)), 2) = Sheet24.Cells(4, 2)
Sheet22.Cells((Sheet1.Cells(502, 11) + Sheet1.Cells
(506, 2)), 3) = Sheet24.Cells(4, 3)
I've been trying to use a while do loop where the
incrementing number is a variable but for some reason a
number won't assign to my count variable.
The format of the while do loop is:
count=1
while (count<103) do
Sheet22.Cells((Sheet1.Cells(502, 11) + Sheet1.Cells(506,
2)), Count) = Sheet24.Cells(4, Count)
count=count+1
Loop
Is this correct? When I run debug it shows count to
equal null. Am I doing something incorrect?
Thanks in advance.
I have multiple lines of code in a macro of the following
format. As you can see some of the cell references
increment by a single digit (up to 103) and everything
else remains the same:
Sheet22.Cells((Sheet1.Cells(502, 11) + Sheet1.Cells(506,
2)), 1) = Sheet24.Cells(4, 1)
Sheet22.Cells((Sheet1.Cells(502, 11) + Sheet1.Cells
(506, 2)), 2) = Sheet24.Cells(4, 2)
Sheet22.Cells((Sheet1.Cells(502, 11) + Sheet1.Cells
(506, 2)), 3) = Sheet24.Cells(4, 3)
I've been trying to use a while do loop where the
incrementing number is a variable but for some reason a
number won't assign to my count variable.
The format of the while do loop is:
count=1
while (count<103) do
Sheet22.Cells((Sheet1.Cells(502, 11) + Sheet1.Cells(506,
2)), Count) = Sheet24.Cells(4, Count)
count=count+1
Loop
Is this correct? When I run debug it shows count to
equal null. Am I doing something incorrect?
Thanks in advance.