from vba for excel to VB6

User avatar
sal21
PlatinumLounger
Posts: 4354
Joined: 26 Apr 2010, 17:36

from vba for excel to VB6

Post by sal21 »

How to modify this line to use in vb6?

ActiveWorkbook.FollowHyperlink Address:="https://ecccc"

User avatar
SpeakEasy
4StarLounger
Posts: 548
Joined: 27 Jun 2021, 10:46

Re: from vba for excel to VB6

Post by SpeakEasy »

Basic functionality can be replicated with something like

Code: Select all

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal Operation As String, ByVal Filename As String, Optional ByVal Parameters As String, Optional ByVal Directory As String, Optional ByVal WindowStyle As Long = vbMinimizedFocus) As Long

Public Sub FollowHyperlinkVB(strLink as String)
 ShellExecute 0, "Open", strLink
End Sub