This seems to work for me:
Code:
Private Sub Command1_Click()
Dim intFound As Integer
intFound = InStr(Form1.Caption, "–")
Form1.Caption = Form1.Caption & Left$(Form1.Caption, intFound) & Text1.Text
End Sub
Your code doesn't work because when You use Left function it automatically erases everything in a caption and then just adds whatever Left came up with.
Note: It will only work if there is no more than one (1) '-' in Form1.Caption
------------------
Visual Basic Programmer (at least I want to be one)
------------------
PolComSoft
You will hear a lot about it.
[This message has been edited by QWERTY (edited 11-14-1999).]