VB - User Forms?


Posted by Julee on June 27, 2001 8:55 PM

Hi, I'm trying to create what I think would be a user form to sequentially number a Word document i.e. a customer contract, every time a new one is generated. I've seen a box on an excel template worksheet that was built for numbering purchase orders. Each time a new one was generated the user had to click on a small icon within the box for the next number, which is find by the way. I believe this is what I'm after. Any insight on achieving an automatic numbering system in Word via Excel would be most appreciated. Thank You!

Julee



Posted by Joe Was on June 28, 2001 5:40 AM

Auto increase

Sheet Tab - View code

Private Sub Workbook_Open()
[B8].Value = [B8] + 1
End Sub

You must save the blank worksheet with the same name befor you add any information to it or the blank input sheet will start with 1001 and goto 1002 each time it is opened! If you save the blank input sheet with 1002 the next time you open it it will be 1003 and so on.

You could add the code to save the workbook after the increase invoice code! JSW

JSW

Hi, I'm trying to create what I think would be a user form to sequentially number a Word document i.e. a customer contract, every time a new one is generated. I've seen a box on an excel template worksheet that was built for numbering purchase orders. Each time a new one was generated the user had to click on a small icon within the box for the next number, which is find by the way. I believe this is what I'm after. Any insight on achieving an automatic numbering system in Word via Excel would be most appreciated. Thank You! Julee