When pressing Enter Key in Textbox1. The row height increases of the cell. How can this be prevented ?
Textbox1.multiline = True
NimishK
Textbox1.multiline = True
Code:
Private Sub Textbox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
If KeyAscii = 13 Then 'The ENTER key.
SendKeys "{tab}" 'Set the focus to the next control.
KeyAscii = 0 'Ignore this key.
End If
End Sub
Code:
Private Sub Textbox1_Change()
ws.Cells(5, 10).value = Textbox1.Text
End Sub
NimishK
Last edited: