This Problem is not Solved, I have this macro & it works sometimes & sometimes it doesnt works
Code:Public Declare PtrSafe Function ShellExecute _ Lib "shell32.dll" _ Alias "ShellExecuteA" ( _ ByVal hwnd As Long, _ ByVal lpOperation As String, _ ByVal lpFile As String, _ ByVal lpParameters As String, _ ByVal lpDirectory As String, _ ByVal nShowCmd As Long) _ As Long Sub STEP2() Dim strFileName As String Dim strFileExists As String strFileName = "C:\Users\WolfieeeStyle\Desktop\Close Excel.lnk" strFileExists = Dir(strFileName) If strFileExists > "" Then Set fso = CreateObject("scripting.filesystemobject") fso.MoveFile Source:="C:\Users\WolfieeeStyle\Desktop\Close Excel.lnk", Destination:="C:\Users\WolfieeeStyle\Desktop\WolfieeeStyle\9.15\" ShellExecute 0, "OPEN", "C:\Users\WolfieeeStyle\Desktop\WolfieeeStyle\9.15\Close Excel.lnk", "", "", 1 Else End If End Sub




Reply With Quote

Bookmarks