Prezados
Boa noite
Como faço para gravar somente o caminho de um arquivo num textbox?
Boa noite
Como faço para gravar somente o caminho de um arquivo num textbox?
Sub wzGetFileName()
Dim wzhwndOwner As Long
Dim wzAppName As String
Dim wzDlgTitle As String
Dim wzOpenTitle As String
Dim wzFile As String
Dim wzInitialDir As String
Dim wzFilter As String
Dim wzFilterIndex As Long
Dim wzView As Long
Dim wzflags As Long
Dim wzfOpen As Boolean
Dim ret As Long
WizHook.Key = 51488399
wzhwndOwner = 0&
wzAppName = "Anexar Propostas"
wzDlgTitle = "Abri o documento"
wzOpenTitle = "Abrir o documento"
wzFile = String(255, Chr(0))
wzInitialDir = ""
wzFilter = "Arquivos em PDF " _
& "(*.pdf)"
wzFilterIndex = 1
wzInitialDir = CurrentProject.Path & "\"
wzView = 1
wzflags = 64
wzfOpen = True
ret = WizHook.GetFileName(wzhwndOwner, _
wzAppName, wzDlgTitle, wzOpenTitle, wzFile, _
wzInitialDir, wzFilter, wzFilterIndex, _
wzView, wzflags, wzfOpen)
' Si no se ha pulsado el botón Cancelar (-302)
If ret <> -302 Then
Me.seu campo texto = wzFile 'aqui você coloca seu campo texto
End If
End Sub