I
icestationzbra
i have a couple of questions.
i have this macro which loops through all the digits in a number, cube
every digit, and adds them up.
when i was experimenting with it, i kept getting 'type mismatch' erro
for the following line - j = Len(i).
then, tried this - j = Len(Trim(i)), and the macro came throug
successfully.
how i came about using trim is, i put a msgbox right after len(i) t
know the length of string. it showed me 4 for 100. thats when i though
of using 'trim'. but i cant figure out as to why would the length be
for 100, i have defined the variable properly (not a string variable).
another question is about the accumulator macro on mcgimpsey's site
whats the utility of enableevents line in the code? if i comment tha
line, the answer is incorrect, so realise its got to be there for
reason. only, i am not able to figure out the reason.
thanks in advance for the resolutions for my queries
i have this macro which loops through all the digits in a number, cube
every digit, and adds them up.
when i was experimenting with it, i kept getting 'type mismatch' erro
for the following line - j = Len(i).
then, tried this - j = Len(Trim(i)), and the macro came throug
successfully.
how i came about using trim is, i put a msgbox right after len(i) t
know the length of string. it showed me 4 for 100. thats when i though
of using 'trim'. but i cant figure out as to why would the length be
for 100, i have defined the variable properly (not a string variable).
another question is about the accumulator macro on mcgimpsey's site
whats the utility of enableevents line in the code? if i comment tha
line, the answer is incorrect, so realise its got to be there for
reason. only, i am not able to figure out the reason.
thanks in advance for the resolutions for my queries