none
Choose by Sector, invoice to print RRS feed

  • Question

  • Hi All,
    I have one Excel file of 2 sheets, the first sheet is the database and the second sheet is the invoice.
    i can save the invoice as pdf and work good but one thing i need is to choose several invoices by sectors and print them at once.
    ex: print ID= 125; 420; 800;...
    or print invoices sector = "Residential"

    Please help,

    Thanks,


    Tuesday, July 7, 2015 3:59 PM

Answers

  • Hi,

    >> is there a way to have one button as my "SavePDF" button to save as pdf and print several invoices ID

    You may need to make a loop for all the values in the drop down box, set the value for the price and customer name. The first link you provided is invalid, referring to the picture, I created a sample sheet,  the data source for the drop down box comes from sheet2, you may take it as a reference, and you can adapt and apply your project.

    Sample WorkSheet : http://1drv.ms/1Ofjfxm

    Hope this could help you

    Best Regards,

    Lan


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by L.HlModerator Sunday, July 19, 2015 7:10 AM
    Thursday, July 16, 2015 2:09 AM
    Moderator

All replies

  • Hello:

    To do multiple print commands, you would need to write a VBA program.
    First, you would need a form to collect the sectors to print.  Then, based on the sector, you would scan the database and find matches to your criteria.  This could be done using the Range.Find method.

    Each time you found a match, you would need to format the invoice and issue a print command, looping through all the data.

    I realize this isn't a coded example, but you would have to provide more detail for either myself or one of the other forum members to provide code examples.,

    The following is just a small snippet of a very large program that prints multiple labels, one at a time, by issuing multiple print commands.  This is not a total solution, but just to give you an idea:

        For lngMultipleCases = 1 To lngNumberOfCasesInRow
            lngCurrentCaseCount = lngCurrentCaseCount + 1
            
    ' *******************************************************
    ' Assemble The Print Area
    ' *******************************************************
            wksLabelPrintArea.Range("F9").Value = wksImportedData.Cells(lngEachLabel, "A")
            wksLabelPrintArea.Range("F11").Value = wksImportedData.Cells(lngEachLabel, "D")
            wksLabelPrintArea.Range("I13").Value = lngCurrentCaseCount
            wksLabelPrintArea.Range("K13").Value = lngTotalCaseCount
    
    ' *******************************************************
    ' Print The Label
    ' *******************************************************
            wksLabelPrintArea.PrintOut Copies:=1, IgnorePrintAreas:=False, ActivePrinter:=strPrinterName
        Next lngMultipleCases
    
    Regards,


    Rich Locus, Logicwurks, LLC

    http://www.logicwurks.com

    • Marked as answer by HmdSlm Thursday, July 9, 2015 1:49 PM
    • Unmarked as answer by HmdSlm Thursday, July 9, 2015 1:50 PM
    Tuesday, July 7, 2015 4:43 PM
  • Hi,

    >> i need is to choose several invoices by sectors and print them at once.

    Are you going to print out several ranges in a sheet at one time? If it is , you may select the ranges at one time and set it being the Print Area, then print out the selected area . The following code , it will print Range(A1:C5) and Range (“A:C11”) at ont time,  you may adapt it and apply to to your project

    Sub OringRanges()
    Union(Range("A1:C5"), Range("A9:C11")).Select
    ActiveSheet.PageSetup.PrintArea = Selection.Address
    ActiveSheet.PrintOut IgnorePrintAreas:=False
    End Sub

    Hope this could help you,

    Best Regards,

    Lan


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, July 8, 2015 5:36 AM
    Moderator
  • Thanks for the answer.
    am trying to send a file so that you can understand my question, but i don't know how to to do it.
    please am new here, help me in how to send a image fine on this help center.



    Best regards,


    Wednesday, July 8, 2015 11:55 AM
  • Thanks for the answer.
    am trying to send a file so that you can understand my question, but i don't know how to to do it.
    please am new here, help me in how to send a image fine on this help center.



    Best regards,

    Wednesday, July 8, 2015 11:56 AM
  • Hi,

    you may share the link for the file by OneDrive. Since this is a new account, it's not allowed to post the hyperlink, so please share the link text for the file.

    Best Regards,

    Lan


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, July 9, 2015 9:27 AM
    Moderator
  • Thanx for the help

    1/ https//1drv.ms/1KXtW7R

    2/ http://1drv.ms/1KXun1T

    When i change the ID on the red cell, the name of the customer and the price change automatically and i can save a copy of my invoice as a PDF or print manually one by one invoice.

    Please, is there a way to have one button as my "SavePDF" button to save as pdf and print several invoices ID? refering on my database, want just to choose all invoices in the sector A and print them all.

    I think now you can understand my question.

    Sorry am not good in VBA

    waiting for your help plz.

    Best regards,

    Hmd

    Thursday, July 9, 2015 2:27 PM
  • Hi,

    you may share the link for the file by OneDrive. Since this is a new account, it's not allowed to post the hyperlink, so please share the link text for the file.

    Best Regards,

    Lan

    Thanks for your help
    Thursday, July 9, 2015 2:28 PM
  • Hi,

    >> is there a way to have one button as my "SavePDF" button to save as pdf and print several invoices ID

    You may need to make a loop for all the values in the drop down box, set the value for the price and customer name. The first link you provided is invalid, referring to the picture, I created a sample sheet,  the data source for the drop down box comes from sheet2, you may take it as a reference, and you can adapt and apply your project.

    Sample WorkSheet : http://1drv.ms/1Ofjfxm

    Hope this could help you

    Best Regards,

    Lan


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by L.HlModerator Sunday, July 19, 2015 7:10 AM
    Thursday, July 16, 2015 2:09 AM
    Moderator