S
Shatin
Can someone please help me with the code below. The purpose of the macro is
to first ask for a brand number. The brand number is then concatenated to
form a valid hyperlink, which points to a pdf file. The macro then opens the
hyperlink. However, I can't get it to work. Any help would be much
appreciated.
-----
Option Explicit
Sub BrandCheck()
Dim hLink As Hyperlink
Dim begLink As String
Dim brandNum As String
Dim endLink As String
brandNum = InputBox("Enter the brand number:")
If brandNum = "" Then
Exit Sub
End If
begLink = "http://www.acb.com/"
endLink = ".pdf"
hLink.Address = begLink & brandNum & endLink
hLink.Follow NewWindow:=False, AddHistory:=True
End Sub
to first ask for a brand number. The brand number is then concatenated to
form a valid hyperlink, which points to a pdf file. The macro then opens the
hyperlink. However, I can't get it to work. Any help would be much
appreciated.
-----
Option Explicit
Sub BrandCheck()
Dim hLink As Hyperlink
Dim begLink As String
Dim brandNum As String
Dim endLink As String
brandNum = InputBox("Enter the brand number:")
If brandNum = "" Then
Exit Sub
End If
begLink = "http://www.acb.com/"
endLink = ".pdf"
hLink.Address = begLink & brandNum & endLink
hLink.Follow NewWindow:=False, AddHistory:=True
End Sub