You probably shouldn't use TextWidth to change the height of the textbox but rather the TextHeight. To use TextHeight you need to know how many lines there are. Here's how to do the whole thing.

VB Code:
  1. Option Explicit
  2. Private Declare Function SendMessageAsLong Lib "user32" Alias "SendMessageA" _
  3.                         (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam _
  4.                         As Long, ByVal lParam As Long) As Long
  5. Const EM_GETLINECOUNT = 186
  6.  
  7. Private Sub Text1_Change()
  8.  
  9.   Dim lngLineCount As Long
  10.  
  11.   ' Make sure we're at the beginning
  12.   Text1.SelStart = 0
  13.   ' Count the number of lines in Text1
  14.   lngLineCount = SendMessageAsLong(Text1.hWnd, EM_GETLINECOUNT, 0, 0)
  15.   ' Multiply line count by line height and add 120 for border
  16.   Text1.Height = TextHeight(Text1.Text) * lngLineCount + 120
  17.   ' Make sure the next character gets placed at the end
  18.   Text1.SelStart = Len(Text1.Text) + 1
  19. End Sub