Caros amigos, peço ajuda com o erro a tentar executar um arquivo :
impossivel localizar o ponto de entrada shellexecuteA de dll em shell32.dll
Com o seguinte código:
Option Compare Database
#If VBA7 Then
'64 bits
Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As LongPtr, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal nShowCmd As Long) As LongPtr
#Else
'32 bits
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
#End If
Private Sub Comando26_Click()
Dim ArqPath As String
Dim nomepasta As String
nomepasta = Me.cx_codinformacao & "\"
If Me.anexo <> "" Then
ArqPath = CurrentDbDir & "\Inform\" & nomepasta & Me.anexo
Call ShellExecute(0, vbNullString, ArqPath, vbNullString, vbNullString, 1)
End If
Desde já agradeço
impossivel localizar o ponto de entrada shellexecuteA de dll em shell32.dll
Com o seguinte código:
Option Compare Database
#If VBA7 Then
'64 bits
Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As LongPtr, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal nShowCmd As Long) As LongPtr
#Else
'32 bits
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
#End If
Private Sub Comando26_Click()
Dim ArqPath As String
Dim nomepasta As String
nomepasta = Me.cx_codinformacao & "\"
If Me.anexo <> "" Then
ArqPath = CurrentDbDir & "\Inform\" & nomepasta & Me.anexo
Call ShellExecute(0, vbNullString, ArqPath, vbNullString, vbNullString, 1)
End If
Desde já agradeço