Announcement

Collapse
No announcement yet.

Loop Through DropDown List For Each Print

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Loop Through DropDown List For Each Print

    Hi Friends,

    I have a data base in one worksheet say employee name/ their salaries break down etc. and a reporting template in another worksheet say pay slip.

    Data in payslip worksheet is captured from the data base worksheet. I use a drop down box to select individual employee name and their pay sheet is automatically generated.

    However, to print the pay slip of all the employees, I need to select each employee name one by one in drop down box and print which is very troublesome as there are over 1000 employees.

    I would love to have a macro that automatically does this for me.

    Could you please assist?

    Many thanks.

    Best Regards,
    Bret

  • #2
    Re: Macro for Printing

    Is it an activex control, or a form control?
    Cheers,

    S M C

    Click To Read: How To Use Tags In Your Threads/Posts
    Please take time to read Forum Rules before posting
    Message To Cross Posters

    Comment


    • #3
      Re: Loop Through DropDown List For Each Print

      And Bret,

      Please note the change I have made to your thread title and in future threads take more care to
      develop a more carefully worded title. The title should be as concise as possible while accurately describing your need/question. The key to proper thread titles is to think "search friendly", which means a search using your title as the search terms would yeild relevant results.
      Cheers,

      S M C

      Click To Read: How To Use Tags In Your Threads/Posts
      Please take time to read Forum Rules before posting
      Message To Cross Posters

      Comment


      • #4
        Re: Loop Through DropDown List For Each Print

        Hi S M C

        Thanks and duly noted regarding thread title.

        Further to my question:

        1) Drop down box is Form Control.

        2) Data base is located in sheet named Data. Employee name starts from A2.

        3) Pay slip template is located in sheet named Format. Drop down box is linked to cell I1

        Thanks for your assistance.

        Bret

        Comment


        • #5
          Re: Loop Through DropDown List For Each Print

          Someone can help please?

          Thanks.

          Comment


          • #6
            Re: Loop Through DropDown List For Each Print

            Code:
            Sub LoopThroughDD()
            
                Dim lngListCount As Long
                
                For lngListCount = 1 To Sheet1.DropDowns("Drop Down 1").ListCount
                    Sheet1.DropDowns("Drop Down 1").Value = lngListCount
                    'Call Print Macro Here
                Next lngListCount
                
                lngListCount = Empty
                
            End Sub
            Cheers,

            S M C

            Click To Read: How To Use Tags In Your Threads/Posts
            Please take time to read Forum Rules before posting
            Message To Cross Posters

            Comment

            Working...
            X