In Excel, when I click a link, it prints out automatically, but nothing happens.
Mozilla is installed on my computer; the path is the same. Where might the root of this issue be? I'm attempting the following with this code:
Sub PrintWebPage()
Dim ie As Object
Dim url As String
Dim cell As Range
' Check if a hyperlink is selected
On Error Resume Next
Set cell = ActiveCell.Hyperlinks(1).Range
If cell Is Nothing Then
MsgBox "Please select a hyperlink."
Exit Sub
End If
On Error GoTo 0
' Get the URL from the hyperlink
url = cell.Hyperlinks(1).Address
' Open the internet page in Google Chrome
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
ie.Navigate url
' Wait for page to load
Do While ie.Busy Or ie.readyState <> 4
DoEvents
Loop
' Print the page
ie.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER
' Close Google Chrome
ie.Quit
Set ie = Nothing
End Sub