 <p>Remove the _ from the lines. You would use them if you are splitting the line, but if you have it all on one line you don't need them.</p> <p>So:</p> <pre><code>Retval = ShellExecute(Me.hwnd, "open", "5.exe", _ 0, 0, SW_HIDE) </code></pre> <p>or</p> <pre><code>Retval = ShellExecute(Me.hwnd, "open", "5.exe", 0, 0, SW_HIDE) </code></pre> <p>would be ok.</p> <p><strong>Edit Based on comment:</strong></p> <p>Just had a look for the error code and I think this might help you: <a href="http://stackoverflow.com/questions/12803768/vbscript-800a0401-expected-end-of-statement">Expected end of statement</a></p> <p>Try removing the As Long. Just as a side note, I would move the dim to the top of the function as well.</p>