Hi Allan,
Does the following routine help you work out how to increment to five
significant digits?
Dim iCount As Integer
Dim sCount As String
For iCount = 1 To 10
If Len(iCount) < 5 Then
Select Case Len(CStr(iCount))
Case 1
sCount = "0000" & iCount
Case 2
sCount = "000" & iCount
''' and so on through 4 cases
Case Else
End Select
End If
Debug.Print sCount
Next iCount
> Hi
> I am trying to create a word template that has a number that increments with
[quoted text clipped - 7 lines]
> If anyone has got any ideas on how to achieve this I would be very
> appreciative to know.
allan - 30 Mar 2005 05:27 GMT
Hi Dave,
I got reply in another section and was directed to
http://word.mvps.org/FAQs/MacrosVBA/NumberDocs.htm
This did the trick perfectly. All I had to do was edit it for 5 sig figures
instead of 3.
I had a play with your code and it almost worked (doubtless something I am
doing), so I will keep it aside for a rainy day and have it as an alternative.
Many thanks
> Hi Allan,
>
[quoted text clipped - 29 lines]
> > If anyone has got any ideas on how to achieve this I would be very
> > appreciative to know.