Hi, I create this simple code. I have a column in Sheet1 filled with bolean operator (true/false, activated by checkboxes). The code below search for true value and if the next cell is empty it fills it with the content
written in the active x textbox I put in Sheet2 (where there are the checkboxes) and finally it cleans the text form. In sheet2 I even put a button to which I assigned this macro (that I write in Sheet1 objects). My question is, there is a way to activate the textbox by pressing enter (Key 13 if I'm not mistaken).
Public Sub BookingInt() Dim indexCol As Integer Dim indexRow As Integer indexCol = 3 indexRow = 5 Do While indexRow < 1220 If Cells(indexRow, indexCol + 1).Value = "True" And Cells(indexRow, indexCol).Value = "" Then Cells(indexRow, indexCol).Value = Worksheets("Sheet2").OLEObjects("TextBox1").Object.Text End If indexRow = indexRow + 1 Loop Worksheets("Sheet2").OLEObjects("TextBox1").Object.Text = "" End Sub
Thanks for any help!