View Single Post
 
Old 10-31-2018, 11:11 PM
phoenixmoto phoenixmoto is offline Windows 7 64bit Office 2007
Banned
 
Join Date: Jul 2018
Posts: 11
phoenixmoto is on a distinguished road
Question vba for next loop

Dim num as integer
sub mac1()
For num = 1 to 50
A = num * 2
cells (1,1) = A
next num
end sub

If i run this code cell cell(1,1) displays 100 i.e 50 * 2 instead of lowest num no i.e 1 * 2 which is equal to 2. Even if i declare A as integer problem persists please help.
Reply With Quote