dukeofscouts
Board Regular
- Joined
- Jan 19, 2009
- Messages
- 146
I have userForm in one of my workbooks that I use often, and wanted to add a feature to it. As a user enters in a value into one of the two text boxs, the value of the third text box is loaded. txtBox1 selects the row, and txtBox2 selects the column, txtBox3 is the cell that is the intersection. So if a user types in the value of the cell A5 for txtbox1, then zz1 for txtBox2 the value of txtbox3 would be the value of zz5.
Obviously I'm working in the "change" event, and have an IF statement that blocks the firing if the other txtbox is null. Going in and doing couple loops to select the cell is not a hard method to write, but it would slow VBA a LOT. Rather, I'm wanting to know if there is a way VBA can "find" the row number and column number of the two values, then just do an activesheet.cells(txtbox1.value.row,textbox2.value.column).
Any suggestions?
Obviously I'm working in the "change" event, and have an IF statement that blocks the firing if the other txtbox is null. Going in and doing couple loops to select the cell is not a hard method to write, but it would slow VBA a LOT. Rather, I'm wanting to know if there is a way VBA can "find" the row number and column number of the two values, then just do an activesheet.cells(txtbox1.value.row,textbox2.value.column).
Any suggestions?