Blank
New Member
- Joined
- Jun 19, 2009
- Messages
- 14
Hello mrexcel users,
Can anyone help me?
I need 2 macro codes wich can do the following (one is for a search button, the other one for a modify button):
If I input a value in the left box of the search frame, I want it to look for the value in the range B8:B1008 and if I input a value in the right box I want it to look for the value in D8:D1008 and all of this I want done with the search button I mentioned above.
If the value isn't found in the specified range I want it to show "Not Found!" in the label underneath the search button.
If the value is found I want it to write the values in the left frame as follows:
- in the first box, the value found in column B;
- in the second box, the value found in column C;
- in the third box, the value found in column D;
- in the forth box, the value found in column E;
- in the fifth box, the value found in colmn F;
- in the sixth box, the value found in column G.
If I press the modify button, I want it to be able to write all the values on the specific row. Also if the value is found I want the row to be selected (not highlighted with a color).
The search frame is named "Frame1" and the modify frame is named "Frame2";
The box in the left of the search frame is named "txtPN2" and the one on the right is named "txtNM2";
The search button is named "cmdCauta" and the label underneath the button is "label10";
The first box in the modify frame is named "txtPN1", the second "txtNB1"; the third "txtNM1"; the forth "txtL1"; the fifth "txtSM1" and the sixth "txtObs1".
The modify button is named "cmdModifica".
The sheet in wich this form should work is "ATR-42".
I have attached a photo of the form.
Can anyone help me?

I need 2 macro codes wich can do the following (one is for a search button, the other one for a modify button):
If I input a value in the left box of the search frame, I want it to look for the value in the range B8:B1008 and if I input a value in the right box I want it to look for the value in D8:D1008 and all of this I want done with the search button I mentioned above.
If the value isn't found in the specified range I want it to show "Not Found!" in the label underneath the search button.
If the value is found I want it to write the values in the left frame as follows:
- in the first box, the value found in column B;
- in the second box, the value found in column C;
- in the third box, the value found in column D;
- in the forth box, the value found in column E;
- in the fifth box, the value found in colmn F;
- in the sixth box, the value found in column G.
If I press the modify button, I want it to be able to write all the values on the specific row. Also if the value is found I want the row to be selected (not highlighted with a color).
The search frame is named "Frame1" and the modify frame is named "Frame2";
The box in the left of the search frame is named "txtPN2" and the one on the right is named "txtNM2";
The search button is named "cmdCauta" and the label underneath the button is "label10";
The first box in the modify frame is named "txtPN1", the second "txtNB1"; the third "txtNM1"; the forth "txtL1"; the fifth "txtSM1" and the sixth "txtObs1".
The modify button is named "cmdModifica".
The sheet in wich this form should work is "ATR-42".
I have attached a photo of the form.