Unlike with C++, where you can just use #include "windows.h", in VB6/VBA (and many other langs, such as: C#, Delphi) you need to actually declare the function before calling it.
Put this up top:
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParams As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long