Guys,

I have an issue I hope you can offer assistance on.

I am trying to define a variable to maintain a number between 01 and 52,
but I want to retain the two digit format, ie... it needs to be 01, - 09.

The purpose of this is to join with another variable to display a Year and Wk format.

This will then be outputted into a cell, and a for next function used to populate subsequent cells with the same value + 1.

Using a String constant I have been able to retain 01, 02 etc, but when my For Next function then populates the cells I lose the 2 digit format, and it revertes to 1, 2, 3 etc.
I have tried both Byte and Long constants but to the same effect.

Below is my code that I am using, any assistance would be most appreciated.

Dim strWk As String
Dim strYear As Long
Dim strProduct As Long

strWk = InputBox("Please enter the current Financial week ? (example: 01,21,52)")
strYear = InputBox("Please enter the current Financial year ? (example: 1999, 2008, 2010)")
strProduct = InputBox("Please enter the product number that you want to view ? (example: 2205, 83312, 5)")

Range("c6").Value = (strWk)

Range("d6").Value = (strYear)

Range("c10").Value = (strProduct)

Dim strFY As String


strFY = strYear & strWk

Range("c15").Value = (strFY)
Range("c15").Select

For x = 1 To 51
ActiveCell.Offset(0, 1).Activate
strWk = strWk + 1
strFY = strYear & strWk
ActiveCell.Value = (strFY)
If strWk = 52 Then strYear = strYear + 1
If strWk = 52 Then strWk = 0
Next x