Killer Bud
05-13-2010, 09:54 AM
Being that I am new to VBA I may not be doing this right....but here is what I'm doing.
I have created a userform with 2 combo boxes and some text boxes. The combo boxes get their data from the properties row source on sheet 1. Combo box 1 text goes to cell A20, Combo Box 2 text goes to cell A25.
I have made a table that has the combo box 1 data down column A and combo box 2 data across row 46. I then created a VLOOKUP to lookup A20 ( combo box 1 ) and match A25 ( combo box 2 ). This works flawlessly on the sheet. When I go to my userform which contains the textbox that I want to show this VLOOKUP value, ( which I am trying to show by using control source of I20 in the properties) , the VLOOKUP stops working and the formula disappears...??
Does this make any sense? The funny thing is that I can change combo box 1 and 2 a few times and it works ( as in the textbox shows the value in I20), but then it stops working. It doesn't give an error, it just keeps whatever value found and does not show the VLOOKUP formula any longer in the cell.
Is there another way to get a value from a cell into a text box on a userform?
Sorry if this is an easy fix, like I said....I'm pretty green to VB
I have created a userform with 2 combo boxes and some text boxes. The combo boxes get their data from the properties row source on sheet 1. Combo box 1 text goes to cell A20, Combo Box 2 text goes to cell A25.
I have made a table that has the combo box 1 data down column A and combo box 2 data across row 46. I then created a VLOOKUP to lookup A20 ( combo box 1 ) and match A25 ( combo box 2 ). This works flawlessly on the sheet. When I go to my userform which contains the textbox that I want to show this VLOOKUP value, ( which I am trying to show by using control source of I20 in the properties) , the VLOOKUP stops working and the formula disappears...??
Does this make any sense? The funny thing is that I can change combo box 1 and 2 a few times and it works ( as in the textbox shows the value in I20), but then it stops working. It doesn't give an error, it just keeps whatever value found and does not show the VLOOKUP formula any longer in the cell.
Is there another way to get a value from a cell into a text box on a userform?
Sorry if this is an easy fix, like I said....I'm pretty green to VB