thanks everyone, but now I have a new problem.. this program I'm making runs in the background (with me.hide), so sendkeys wouldn't work..
I searched the forum and found some code but can't get it to work
I also downloaded winspy++ to check if the name of the editbox was "Edit" and I'm pretty sure it isCode:Private Sub Timer1_Timer() opendialog = FindWindow(vbNullString, "Choose file") If opendialog > 0 Then hEdit = FindWindowEx(opendialog, 0&, "Edit", vbNullString) Call SendMessage(hEdit, WM_SETTEXT, 0&, "C:\test.txt") Timer1.Enabled = False End If End Sub




Reply With Quote