• 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 dropdown list fields

itisalikhan

New Member
Hi there!

In cell C7 (of sheet B), I have adropdown list (using data validation) of names. (let say, Dave,Mike, Steve,Jhon ,Blair)The things I want to do with vbcodes are as under:-

Let suppose, I select the first name(i.e Dave) from drop. Now I want some codes that’ll automatically

select the next name (i.e Mike) fromdropdown list and take the print of first page (i.e page #1, ). Sheet B canhave more than one page that is why I am insistent for taking the print of page#1

Then

Select the next name (i.e Steve) fromdropdown list and take the print of first page.

Then

Select the next name (i.e Jhon) fromdropdown list and take the print of first page.

And so on till last name (i.e Blair).


Please note that I have some blankfields at the end of my dropdown list. The codes should not select those blankfields. Or you can say that the process of selecting the next fields shouldstop on last name of dropdown list.

Any help would be highlyappreciated.
 
Hi Khan ,


What is the connection between the name and the printout ?


What is the meaning of :


Select the next name (i.e Steve) from dropdown list and take the print of first page.


Narayan
 
Actually on sheet B, i have a salary voucher. in cell C7, i have a dropdown list of names. In other cell i am using the index and match funtion, that extract the data from sheet A. As i change the name in cell c7 where the drop down list exist. The relvant amount of salary changed. I want to take the print of voucher for every name avaliable in dropdown list (dropdown list is in cell c7). Hope i make it clear.


Is there any way to attach the file. So that i may attach the sample file. i am new in the forum.
 
There's a sticky post in the start of the forum named "Posting a sample workbook". Have a look at it.
 
There is a drop down list in the cell C7. The dropdown list has following fileds/names.

Dave

Mike

Steve

Jhon

Blair

I clicked on drop down list and select the first name that is Dave. Now I want a button that automatically select the next name/second name from dropdown list and the next name is Mike.

Sorry for my bad english.

here is the link for sample file

http://www45.zippyshare.com/v/73075699/file.html
 
Hi Khan ,


I understand that you want to take a printout of a salary voucher for each employee ; wouldn't it be better if instead of a drop-down , you had a list of employees , which the macro can go through one by one ?


I assume the salary voucher on sheet B is a pre-designed form , which will have all the details of an employee ; when the employee ID is put in , all the other details such as name , days of attendance , days of leave , salary will be automatically updated.


If you can have the list of employees , on a separate sheet , then the macro can go through this list , and insert the employee ID from this list into the appropriate cell in sheet B , so that the salary voucher is updated , print this updated voucher , step to the next employee in the list , and repeat till all the employees are covered.


Narayan
 
Exactly, the sheet B is a pre-designed form. As you said in the last para, i already have a list of employees on sheet A. Here is the link of my sample file.

http://www45.zippyshare.com/v/73075699/file.html
 
Back
Top