Private sub Cmdsend_click() Dim Text As String Text = Text1.Text AppActivate "Notepad.exe" SendKeys Text End Sub