+ Reply to Thread
Results 1 to 2 of 2

VBA Command to Find Invoices designated as NotPrinted and place invoice number into cell o

  1. #1
    Registered User
    Join Date
    04-18-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    17

    VBA Command to Find Invoices designated as NotPrinted and place invoice number into cell o

    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!
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: VBA Command to Find Invoices designated as NotPrinted and place invoice number into ce

    Hi mcarrigg1,
    You supplied an .xlsx file that does not support macros, so you do not have a module1 as you have indicated.
    I assume you have a print code in your original workbook.
    Try this.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1