ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Macro to create new invoice (https://www.excelbanter.com/excel-worksheet-functions/178274-macro-create-new-invoice.html)

MB[_2_]

Macro to create new invoice
 
Hi,

I would like to create a macro which clears the contents of selected cells,
creates a new invoice number by adding 1 to the previous number then saves
the document.

I am OK with the clearing cells and saving worksheet part of the macro but I
am not sure how to add the number to the invoice. Any help appreciated.



Conan Kelly

Macro to create new invoice
 
MB,

Where is the invoice number? A cell in the sheet? Sheet name (on the sheet
tab)?

Conan



"MB" wrote in message
...
Hi,

I would like to create a macro which clears the contents of selected
cells, creates a new invoice number by adding 1 to the previous number
then saves the document.

I am OK with the clearing cells and saving worksheet part of the macro but
I am not sure how to add the number to the invoice. Any help appreciated.




Cimjet[_2_]

Macro to create new invoice
 
Hi MB
Are you asking to add to your macro a way to increment a number let say
012345 in cell D1 everytime you execute the macro??
Regards
Cimjet
"MB" wrote in message
...
Hi,

I would like to create a macro which clears the contents of selected
cells, creates a new invoice number by adding 1 to the previous number
then saves the document.

I am OK with the clearing cells and saving worksheet part of the macro but
I am not sure how to add the number to the invoice. Any help appreciated.



MB[_2_]

Macro to create new invoice
 
Yes, that's what I'm trying to do.


"Cimjet" wrote in message
...
Hi MB
Are you asking to add to your macro a way to increment a number let say
012345 in cell D1 everytime you execute the macro??
Regards
Cimjet
"MB" wrote in message
...
Hi,

I would like to create a macro which clears the contents of selected
cells, creates a new invoice number by adding 1 to the previous number
then saves the document.

I am OK with the clearing cells and saving worksheet part of the macro
but I am not sure how to add the number to the invoice. Any help
appreciated.





MB[_2_]

Macro to create new invoice
 
Yes, there is only one sheet and the invoice number is in a cell, I am
trying to get it to advance by one every time I create a new invoice and at
the same time clear the details from other cells used in the previous
invoice.


"Conan Kelly" wrote in message
...
MB,

Where is the invoice number? A cell in the sheet? Sheet name (on the
sheet tab)?

Conan



"MB" wrote in message
...
Hi,

I would like to create a macro which clears the contents of selected
cells, creates a new invoice number by adding 1 to the previous number
then saves the document.

I am OK with the clearing cells and saving worksheet part of the macro
but I am not sure how to add the number to the invoice. Any help
appreciated.






jatman

Macro to create new invoice
 
somewhere on the sheet is where you have your current invoice number, let's
just say K8 is where you have your invoice number.

next, somewhere in your macro, you need to add the following

mycount = Range("K8") + 1
Range("K8") = mycount

hope that helps,

jatman.

"MB" wrote:

Hi,

I would like to create a macro which clears the contents of selected cells,
creates a new invoice number by adding 1 to the previous number then saves
the document.

I am OK with the clearing cells and saving worksheet part of the macro but I
am not sure how to add the number to the invoice. Any help appreciated.




MB[_2_]

Macro to create new invoice
 
Works perfectly. Thanks very much :}
"jatman" wrote in message
...
somewhere on the sheet is where you have your current invoice number,
let's
just say K8 is where you have your invoice number.

next, somewhere in your macro, you need to add the following

mycount = Range("K8") + 1
Range("K8") = mycount

hope that helps,

jatman.

"MB" wrote:

Hi,

I would like to create a macro which clears the contents of selected
cells,
creates a new invoice number by adding 1 to the previous number then
saves
the document.

I am OK with the clearing cells and saving worksheet part of the macro
but I
am not sure how to add the number to the invoice. Any help appreciated.







All times are GMT +1. The time now is 01:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com