I want to open a text file using Notepad++ when a user presses a button on a user form.
The following worked fine in XP, but gives the error "file not found" under Windows 7. I cant find a simple answer on how to open a text file from VBA in Windows 7 . Can anybody help please? is the Shell command no longer valid in Win 7?
Private Sub Btn_Edit_Settings_Click()
Dim striniFileName As String
FileName = "c:\Settings.txt"
Shell "C:\Program Files (x86)\Notepad++.exe" & FileName, vbMaximizedFocus
Formatting tags added by mark007