By using wcxd.booksticle.com you agree to our cookie policy, We and our partners operate globally and use cookies, for multiple purposes

60 Things That Excel Can Do



Feature 57 - Open Websites or Run Programs


Excel is good at opening websites and running programs

One way is via hyperlinks, but Excel through the API can also perform these tasks.



Sub RunProgram(sFile, Optional args, Optional runInFolder)
'Version: 1.000
'Purpose: This run passed sFile
  Dim RetVal As Long
  On Error Resume Next
  RetVal = ShellExecute(0, "open", sFile, "", "", SW_SHOWMAXIMIZED)
End Sub

----------

Public Declare 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


   ←Create Insert Query from column data | →Control PowerPoint | Table of Contents | Send us your feedback | Random | © 2025 All Rights Reserved | Edit