Okay i have a combo box (categories), a textbox (AddNewCategory)
and a button (add2)
The user types in a file name then clicks the button Add2 then that goes to the categories(combobox). Then i want it to be opened in notepad right after its been clicked ( feel free to take the sleep out) I use this code below to do it except when opening Notepad it wont work.
please help!Code:Private Sub Add2_Click() Dim fso As New FileSystemObject Dim Apath As String Dim Spath As String Apath = App.Path Categories.AddItem (AddNewCategory.Text) fso.CreateTextFile (AddNewCategory.Text & ".txt") Spath = Apath & "\" & AddNewCategory.Text & ".txt" Sleep 1000 Shell "Notepad" Spath, vbNormalFocus End Sub
thanks in advance


Reply With Quote
Thanks DR.
