Funcionou certinho, mas tem como mudar a linha acima e usar o navegador padrão do computador e não somente o Internet Explorer?
Tem que ser utilizado o API ShellExecute.
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
Ai é só chama-lo.
Sub Botão()
Dim ExeBt As Long
ExeBt = ShellExecute(hwnd, vbNullString, "http://www.planilhando.com.br", vbNullString, "c:", SW_SHOWNORMAL)
End Sub
Fonte:http://www.bufaloinfo.com.br/dicas.aspx?cod=141
Como você está tendo problema com 64-bit, pode declarar assim:
#If VBA7 Then
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
#Else
Private Declare PtrSafe 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
Pietro Farias
Se foi resolvido suas dúvidas, lembre se de marcar o tópico como RESOLVIDO.
ANALISTA X
Postado : 10/02/2017 11:14 am