S
sandra
Hello,
I'm a newbie.
I've got a blank invoice set-up to count with the
following (so each time the blank one's opened, the next
available number comes up)
Private Sub Workbook_Open()
With Sheets(1).Range("K5")
.Value = .Value + 1
ThisWorkbook.Save
End With
End Sub
The thing is, I don't want it to count anymore if someone
does a save as. So, say someone brings up blank invoice
#101, fills it out and saves as Smith job; the next time
they open Smith job, it should still be #101. I'm stuck
at
Private Sub Workbook_Open()
Dim Book As Workbook
If Book.Name = "Test" Then
With Sheets(1).Range("K5")
.Value = .Value + 1
Book.Save
End With
End If
End Sub
My book's not helping me on this one. TIA!
I'm a newbie.
I've got a blank invoice set-up to count with the
following (so each time the blank one's opened, the next
available number comes up)
Private Sub Workbook_Open()
With Sheets(1).Range("K5")
.Value = .Value + 1
ThisWorkbook.Save
End With
End Sub
The thing is, I don't want it to count anymore if someone
does a save as. So, say someone brings up blank invoice
#101, fills it out and saves as Smith job; the next time
they open Smith job, it should still be #101. I'm stuck
at
Private Sub Workbook_Open()
Dim Book As Workbook
If Book.Name = "Test" Then
With Sheets(1).Range("K5")
.Value = .Value + 1
Book.Save
End With
End If
End Sub
My book's not helping me on this one. TIA!