Hi,
I am a herbal medicine practioner, I made a excel program to help me in my trade. I need some help from excel vba masters that how can I do vba coding for following:
1) Sheet1 col A and B
[TABLE="width: 161"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Medicine[/TD]
[TD]Tmp No[/TD]
[/TR]
[TR]
[TD]Mohrak[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Molyen[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]Shadeed[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Molyen[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Seelani[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]Moqvee[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Taryaq[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Mohrak[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]Moshel[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Akseer[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Moqvee[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Taryaq[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Jwarish Imli[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Hab Sabir[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]Mohrak[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Shadeed[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Molyen[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Moshel[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Ojaee[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]Atreefal[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Molyen[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]Moshel[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]Akseer[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]Molyen[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]Molyen[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD]Hazim[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]Foladi[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]Soosi[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]Taryaq meda[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]Akseer Itfaal[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Akseer Jigar[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD]Hab Mqvee Khas[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD]Akseer Jadeed[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD]Moqvee[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]Taryaq[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]Akseer[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Shadeed[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]Molyen Khas[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]Hab Shifa[/TD]
[TD="align: right"]6[/TD]
[/TR]
</tbody>[/TABLE]
(It is a long list but I just paste a short sample.)
What I need is:
there are 8 Combo boxes (all populated with the col A sheet1, and a label.caption with combo box showing it Tmp No according to selection) on my Userform to select the medicine for a patient, but some medicines should not be mixed with each other according to there Tmp Numbers, for example:
Tmp No 1 can not be mixed with Tmp No 2 and 3.
Tmp No 2 can not be mixed with Tmp No 1, 5 and 6.
Tmp No 3 can not be mixed with Tmp No 6 and 1.
Tmp No 5 can not be mixed with Tmp No 3.
Tmp No 6 can not be mixed with Tmp No 2 and 4
If I select medicine of two different Temperaments from any comboboxes in userform then warning alert message show an alert "Do not mix these medicines".
Please help in this matter to solve my problem.
Thanks
I am a herbal medicine practioner, I made a excel program to help me in my trade. I need some help from excel vba masters that how can I do vba coding for following:
1) Sheet1 col A and B
[TABLE="width: 161"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Medicine[/TD]
[TD]Tmp No[/TD]
[/TR]
[TR]
[TD]Mohrak[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Molyen[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]Shadeed[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Molyen[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Seelani[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]Moqvee[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Taryaq[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Mohrak[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]Moshel[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Akseer[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Moqvee[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Taryaq[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Jwarish Imli[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Hab Sabir[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]Mohrak[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Shadeed[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Molyen[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Moshel[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Ojaee[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]Atreefal[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Molyen[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]Moshel[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]Akseer[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]Molyen[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD]Molyen[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD]Hazim[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]Foladi[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]Soosi[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]Taryaq meda[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]Akseer Itfaal[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Akseer Jigar[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD]Hab Mqvee Khas[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD]Akseer Jadeed[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD]Moqvee[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]Taryaq[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]Akseer[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Shadeed[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]Molyen Khas[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]Hab Shifa[/TD]
[TD="align: right"]6[/TD]
[/TR]
</tbody>[/TABLE]
(It is a long list but I just paste a short sample.)
What I need is:
there are 8 Combo boxes (all populated with the col A sheet1, and a label.caption with combo box showing it Tmp No according to selection) on my Userform to select the medicine for a patient, but some medicines should not be mixed with each other according to there Tmp Numbers, for example:
Tmp No 1 can not be mixed with Tmp No 2 and 3.
Tmp No 2 can not be mixed with Tmp No 1, 5 and 6.
Tmp No 3 can not be mixed with Tmp No 6 and 1.
Tmp No 5 can not be mixed with Tmp No 3.
Tmp No 6 can not be mixed with Tmp No 2 and 4
If I select medicine of two different Temperaments from any comboboxes in userform then warning alert message show an alert "Do not mix these medicines".
Please help in this matter to solve my problem.
Thanks