Possible to store in a cell of sheet a increment of number to simulate major, minor, revision in vb6?
All in the event Beforesave of workbook
Possible to store in a cell of sheet a increment of number to simulate major, minor, revision in vb6?
All in the event Beforesave of workbook
there has been a thread on this recently, do a search
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed![]()
pete
haha, i found it easy, it was your previous thread on the same subject
you would have to specify any update value, except the revision, no way to automatically tell if major or minor update, unless you code it in elswhere
no tested at all, will give problem above version 99, version resets to 0 with major/minor changeCode:mm = inputbox ("major /minor increase? Format ""01.01""" , left(range("x3"), 5)) ' where X3 is the cell containing current version if mm = mm & "." left(range("x3"), 5) then v = ".00" else v = right(range"x3"), 3) +.01 range("x3").value = mm & v
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed![]()
pete
that is what you get typing code into a webbrowser and not testing, try fixed and tested versionsorry but your code have many sintiax error
Code:mm = InputBox("major /minor increase? Format ""01.01""", , Left(Range("b3"), 5)) ' where B3 is the cell containing current version If mm = Left(Range("b3"), 5) Then v = Right(Range("b3"), 3) + 0.01 Else v = ".00" Range("b3").Value = mm & v
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed![]()
pete