Macro for Excel

Ann T.

New Member
Joined
Sep 20, 2006
Messages
2
How do I set up a macro for sequential numbering in an invoice that is linked to a data entry form in the same work book.

Also I want to save the invoice after it's printed to another workbook and somehow not have the links update the archived information. Is there a macro that would take care of this?

I know nothing about how to do a macro or VBA so please take it easy on me.

Thanks - Ann T.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Welcome to the Board!

You can actually do a lot of this with the macro recorder (just post what you get when you're done and someone can clean it up for you).

If you record a new macro, then Save & Save As, you can then select all-->Copy-->Paste Special-->Values to eliminate links.

To increment the Invoice number you can use something like this:

Code:
Sheets("Invoice").Range("A1").Value = Sheets("Invoice").Range("A1").Value +1

But you'd have to indicate when you want the number to update, when the WB is opened or printed.

I'd be happy to send you an Invoice template that does a lot of that but instead of creating copies, saves the invocie data to a database. Just PM me your e-mail address.

Hope that helps,

Smitty
 
Upvote 0
Invoice numbering and archiving

The information you sent me is very helpful and I have yet to try it, but I think we're on the same page. I would love to take a look at your invoice template and see how it would work for the company. What we're aiming for is to have the number update upon "open", then once it is saved to go to an archive. The archived invoices would be viewed from time to time and we would like the originally assigned number not to change after closing the document. That way if there are edits or revisions to the data input we could edit and print without loss of information.

Thanks again for your help and hope to hear from you soon.

Ann T.

EDIT: Removed your e-mail address for security. File's on its way. Smitty
 
Upvote 0

Forum statistics

Threads
1,214,617
Messages
6,120,541
Members
448,970
Latest member
kennimack

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top