Mcarrigg
04-23-2012, 04:13 PM
Hi All,
I have a project that i am working on and i am stuck on an issue.
I have a workbook which has three worksheets.
"Details" - Contains invoice information in rows...each invoice number may have multiple rows depending on items invoiced
"Invoice" - Invoice template gets populated by entering invoice number from "Details" sheet column A
"Customers" - Contains Customer information.
I have got a module macro function in my main workbook that copies the invoice template to its own workbook, saves a pdf and emails each invoice once a command button beside the invoice is pressed and this works fine.
Basically my problem is that I want to click a command button that when clicked, searches column Q of "Details" worksheet and finds each instance of ïnvoices that are un printed ("not printed").
Once the command finds a not printed value, it grabs the invoice number from column A of the "Details" sheet and places this invoice number into cell H11 of the "Invoice" worksheet template.
My formulas in the invoice template worksheet will automatically update the invoice based on invoice number.
Once this is done I want it to launch my macro to copy print and email pdf (Called CopySend() Macro located in Module1). Once this process is completed it changes the invoice status to "Printed" and then goes on to search for the next instance of "not printed" and repeat the process.
Please see attached sample workbook for structure (formulas are not working in this one but work in my main file)
I am new to VBA and struggling to get my head around a VBA solution.
Thanks for your help on this one!
I have a project that i am working on and i am stuck on an issue.
I have a workbook which has three worksheets.
"Details" - Contains invoice information in rows...each invoice number may have multiple rows depending on items invoiced
"Invoice" - Invoice template gets populated by entering invoice number from "Details" sheet column A
"Customers" - Contains Customer information.
I have got a module macro function in my main workbook that copies the invoice template to its own workbook, saves a pdf and emails each invoice once a command button beside the invoice is pressed and this works fine.
Basically my problem is that I want to click a command button that when clicked, searches column Q of "Details" worksheet and finds each instance of ïnvoices that are un printed ("not printed").
Once the command finds a not printed value, it grabs the invoice number from column A of the "Details" sheet and places this invoice number into cell H11 of the "Invoice" worksheet template.
My formulas in the invoice template worksheet will automatically update the invoice based on invoice number.
Once this is done I want it to launch my macro to copy print and email pdf (Called CopySend() Macro located in Module1). Once this process is completed it changes the invoice status to "Printed" and then goes on to search for the next instance of "not printed" and repeat the process.
Please see attached sample workbook for structure (formulas are not working in this one but work in my main file)
I am new to VBA and struggling to get my head around a VBA solution.
Thanks for your help on this one!