Jump to content
Fórum Script Brasil
  • 0

Shellexecute


cassitos

Question

fala galera!

seguinte pesquisei ae pela net sobre o ShellExecute

tá acontecendo algo que não entendi ainda o por que, declarei num módulo:

Private 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

Const SW_NORMAL = 1        ' normal

Const SW_SHOWMAXIMIZED = 3  ' maximizado

e chamo a função assim:

NomeDest = "C:\Pasta do HSA\MR Informática\Transvip\Tesouraria\Processamento.xls"

ShellExecute Me.hwnd, "Open", Chr(34) & NomeDest & Chr(34), vbNullString, vbNullString, SW_SHOWMAXIMIZED

ele abre rapidamente o Excel e fecha!?!?!?! huh.gif

to precisando urgente utilizar esta rotina... sad.gif

any help?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      651.8k
×
×
  • Create New...