Help!

invoice numbers - help 5

 
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> General Discussions RSS
Next:  I can't move the cursor into my second column  
Author Message
D.J.Shaw JP
External


Since: Aug 22, 2009
Posts: 6



PostPosted: Sat Aug 22, 2009 2:10 am    Post subject: invoice numbers
Archived from groups: microsoft>public>excel (more info?)

How can I get sequential numbers in an invoice template. Office 2007. Using
several templates from microsoft. Is there any other templates out there?
Dennis
Back to top
Bob Phillips
External


Since: Jan 08, 2009
Posts: 63



PostPosted: Sat Aug 22, 2009 4:10 am    Post subject: Re: invoice numbers [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

See http://www.mcgimpsey.com/excel/udfs/sequentialnums.html

--
__________________________________
HTH

Bob

"D.J.Shaw JP" wrote in message

> How can I get sequential numbers in an invoice template. Office 2007.
> Using several templates from microsoft. Is there any other templates out
> there?
> Dennis
>
Back to top
D.J.Shaw JP
External


Since: Aug 22, 2009
Posts: 6



PostPosted: Sun Aug 23, 2009 2:10 am    Post subject: Re: invoice numbers [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thank you for the post but I am a bit green in the area of Macros. Do you
have a reatively simple way (I guese for Dummys) to go about this task.
Dennis
"Bob Phillips" wrote in message

> See http://www.mcgimpsey.com/excel/udfs/sequentialnums.html
>
> --
> __________________________________
> HTH
>
> Bob
>
> "D.J.Shaw JP" wrote in message
>
>> How can I get sequential numbers in an invoice template. Office 2007.
>> Using several templates from microsoft. Is there any other templates out
>> there?
>> Dennis
>>
>
>
Back to top
Bob Phillips
External


Since: Jan 08, 2009
Posts: 63



PostPosted: Sun Aug 23, 2009 8:10 am    Post subject: Re: invoice numbers [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

JE gives you the code. Which bit are you struggling with?

--
__________________________________
HTH

Bob

"D.J.Shaw JP" wrote in message

> Thank you for the post but I am a bit green in the area of Macros. Do you
> have a reatively simple way (I guese for Dummys) to go about this task.
> Dennis
> "Bob Phillips" wrote in message
>
>> See http://www.mcgimpsey.com/excel/udfs/sequentialnums.html
>>
>> --
>> __________________________________
>> HTH
>>
>> Bob
>>
>> "D.J.Shaw JP" wrote in message
>>
>>> How can I get sequential numbers in an invoice template. Office 2007.
>>> Using several templates from microsoft. Is there any other templates out
>>> there?
>>> Dennis
>>>
>>
>>
>
>
Back to top
lantere
External


Since: Aug 24, 2009
Posts: 1



PostPosted: Mon Aug 24, 2009 6:13 am    Post subject: RE: invoice numbers [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

This is a very basic solution.
(You don't have to follow everything. Whatever works for you.)

On the Invoice Template, specify a cell.
(For instance, we will use Z1.)
Label the cell as "DocNum_Location".
Enter the Full Path to a Numbers File.
(C:\My\Files\Numbers.txt.)

Place a text file in that location.
In it, type the next Invoice Number.
(Numbers only!, and on the first line only!)

Label your Invoice Number Cell as "Document_FileNumber".
(Feel free to change these to match yours.)

Press Alt+F11.
(Hope your Template is not protected, or you have the password.)

If your Template is protected, and you don't have the password, do the
following on the "PERSONAL.XLS???" insted. Otherwise, do it on the Template.
(I don't know what it is called on Excel 2007, hence the ???)

Add a Module to your Template.
In it, type the following:



Sub GetAndSetInvoiceNumber()

' Get the next number from a file.
Open Range("DocNum_Location").Value For Input As #1
Input #1, Rec1
Range("Document_FileNumber").Value = Rec1
Close #1

' Now for incrementing and saving...
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile(Range("DocNum_Location").Value, True)
a.WriteLine (Range("Document_FileNumber").Value) + 1
a.Close

End Sub



Now, on your Template (in Excel), create a button.
(Or just make an Autoshape.)
Link it with your "GetAndSetInvoiceNumber" Macro.

Save your Template.





"D.J.Shaw JP" wrote:

> How can I get sequential numbers in an invoice template. Office 2007. Using
> several templates from microsoft. Is there any other templates out there?
> Dennis
>
>
>
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> General Discussions All times are: Eastern Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum