Populating a work sheet from excel based

Closed
melissa - Feb 10, 2015 at 08:11 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Feb 12, 2015 at 11:05 AM
Hello,

I need your guidance please: I've got a tall order :) I hope you can help me!

I am trying to have a new worksheet created from a template when I type information in a cell.
For example, If I fill in the invoice form invoice , I want it to create a work sheet in the second tab form the information I just typed in the invoice. I also want the invoice number to regenerate every time I print the invoice.

Thank you in advance

3 responses

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 555
Feb 10, 2015 at 11:09 AM
Hi Melissa,

What I understand from your query is that you manually fill in an invoice and after you print the invoice, clear the entered fields and increase the invoice number by 1.

Is this correct?

Also could you upload your file using a file sharing site like www.speedyshare.com or ge.tt and post back the download link (careful with sensitive information), for a better understanding of your lay out?

Best regards,
Trowa
0
Hello Trowa

that's correct.

I up loaded it - link is http://speedy.sh/a37Gb/HU.xls

thank you for helping!
0
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 555
Feb 12, 2015 at 11:05 AM
Hi Melissa,

Not sure which ranges need to be cleared, but you can add ranges yourself.

Also not sure how you want your order number to look like. Now it's a single number, which will increase by 1 every time the code is run.

Here is the code:
Sub ClearForm()
Range("D3:I3,E4:I4,E5:I7,E8:F10,H8:I8,I9,C18:I30").ClearContents
Range("H9") = Range("H9") + 1
End Sub


Let us know if further assistance is desired.

Best regards,
Trowa
0