I am trying to produce an invoice that will increment the invoice #.
This is the Code that I have:
The incrementing of J3 works fine if it was just numeric.
In my case J3 is alphanumeric.
Cell J3 holds (currently) 100A. This I would like to increment to 101A, etc. And of course one day it may hit 1001A.
Any help appreciated.
Thanks
This is the Code that I have:
Code:
Private Sub CommandButton1_Click()
Dim Ans As Integer
Ans = Application.InputBox(Prompt:= _
"How many copies do you want to print?", Title:="How Many Copies?", _
Default:=1, Type:=1)
If Ans = False Then
Application.DisplayAlerts = False
Exit Sub
Else
ActiveWindow.SelectedSheets.PrintOut Copies:=Ans
End If
With ActiveSheet
.Range("J3").Value = .Range("J3").Value + 1
End With
End Sub
The incrementing of J3 works fine if it was just numeric.
In my case J3 is alphanumeric.
Cell J3 holds (currently) 100A. This I would like to increment to 101A, etc. And of course one day it may hit 1001A.
Any help appreciated.
Thanks