i managed to sort a coding out. as follows:
Private Sub Workbook_Open()
Dim LOldVal As Integer
Dim LNewVal As String
'Retrieve current number
LOldVal = Sheets("Sheet1").Range("A2").Value
LNewVal = Format(LOldVal + 1, "0000")
'Update to new number
Sheets("Sheet1").Range("A2").Value = "'" & LNewVal
End Sub
thanks for your help in any case, i think this coding is a bit mor
straight forward for me.
Z
--
Message posted from
http://www.ExcelForum.com