View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Alf[_12_] Alf[_12_] is offline
external usenet poster
 
Posts: 1
Default Number formate of Integer


Part of my macro looks like this:

Dim i As Integer

For i = Range("C2"). Value To Range("C3").Value Step 1

I've formated cells "C2" and "C3" so if I put 2 in "C2" and 10 in "C3"
it shows002 and 010.

When I run the macro i goes from 2 to 10 instead of 002 to 010.

I tried Range("C2").Value.NumberFormate = "000" This gives me a
Run-time error "424" : Object required

Gratefull for any hints to solve this problem.


--
Alf
------------------------------------------------------------------------
Alf's Profile: http://www.excelforum.com/member.php...fo&userid=7112
View this thread: http://www.excelforum.com/showthread...hreadid=553424