Sequential number in Excel

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

deerejohn1

Thread Starter
Joined
Dec 3, 2011
Messages
3
I am working on creating a repair oder for auto repair. What I am trying to do is have Excel generate a repair order number for each repair order created. Each repair order will have different customers, so different repair order numbers will be crucial. Also, multiple computers will use this template. I have no idea how to do this. I have attached the document with the repair order cell highlighted in yellow. Can anyone here help me figure this out.
Excel 2010
 

Attachments

deerejohn1

Thread Starter
Joined
Dec 3, 2011
Messages
3
I found a function to clear the repair order data using a click command button and VBA code. I will keep working on the sequential number function. I attached what I have thus far.
 

Attachments

deerejohn1

Thread Starter
Joined
Dec 3, 2011
Messages
3
I have a code that I pasted into this workbook, but I am having trouble getting it to work.

Private Sub Workbook_Open()
Dim FName As String
Dim FNo As String
Dim x As Long
FName = ThisWorkbook.Path & Application.PathSeparator & "Number.Txt"
FNo = FreeFile
x = 0
On Error Resume Next
Open FName For Input As #FNo
Input #FNo, x
x = x + 1
' *** Change range reference to suit ***
Range("A1").Value = x
Close #FNo
FNo = FreeFile
Open FName For Output As #FNo
Write #1, x
Close #FNo
End Sub


The highlighted part is what it does not like. Any ideas..

Thanks much for the replies
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top