• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

selection of next name in data validation drop down list through vba

itisalikhan

New Member
Hi there!

On sheet A, I have data in four column i.e Sr. NO, Names, Desigantion, Amount.

On sheet B, I have a pre-designed payment voucher. In cell C7 of sheet B, I have a dropdown list (using data validation) that show all the names mentioned in second column (Names) of Sheet A. I am using index and match function with reference to cell C7. As I change the name from dropdown list (exist in cell C7), the other details like Designation and Amount etc automatically updates. Everything is working fine.

The problem begins when I want to take the print for all employees. Every time, I have to manually click the dropdown list and select the name and then I gives the print command. I am seeking for codes that automatically select the next name from dropdown list and take the print of payment voucher for me.

Any help would be highly appreciated
 
Hi itisalikhan,


It can easily be done with vba. Taking the total names count and changing the drop down values with the help of print code will do what you are looking for.


Please post a sample file for more analysis.
 
Thanks for the reply Dhamo. Actually i am totally ignorant agbout vb codes. Here is sample file link. can you plz write the codes for me?

http://www45.zippyshare.com/v/73075699/file.html
 
Not sure but can you try this


Sub print_all()


Dim i As Double


i = [D65000].End(xlUp).Row


For Each cell In Range("NamesofTransfer")

If cell.Value <> "" Then

Sheets("B").Range("C7").Value = cell.Value

Sheets("B").PrintOut

End If

Next cell


End Sub
 
Back
Top