Invoice number (1 Viewer)

cymrudesign

Registered User.
Local time
Today, 07:53
Joined
May 7, 2006
Messages
84
Simple invoice but i need it to auto increment the invoice number
im using
Private Sub Workbook_Open()
MyInv = Sheets("Sheet1").Range("A1").Value
MyInv = MyInv +1
Sheets("Sheet1").Range("A1") = MyInv
End Sub

it works if i run it from the vb window but not when the invoice is opened

have i missed something here???


A
 

MGumbrell

Registered User.
Local time
Today, 15:53
Joined
Apr 22, 2005
Messages
129
cymrudesign

I have attached a file that contains your code but has an addtional ComandButton that once clicked increases the number in Range A1 by one.

It would appear that the
Private Sub Workbook_Open()
Is not the correct method for actionaing the auto increment you require. I am sure someone on this forum will be able to advise you further but I will be having a look just to satisfy myself how to carry out this function.

Regards, Matt
 

Attachments

  • Book1.zip
    6.5 KB · Views: 352

MGumbrell

Registered User.
Local time
Today, 15:53
Joined
Apr 22, 2005
Messages
129
cymrudesign

Please see attached.

You have the right code it just needs to be placed in workbook window.

see attached file.

Regards, Matt
 

Attachments

  • BookA.zip
    6.2 KB · Views: 412

Users who are viewing this thread

Top Bottom