Hi,
I am trying to run an excel workbook (with 7 sheets) via a webbrowser. Users have to enable macros to run three particular sheets on this workbook. There's a button on these sheets that hyperlinks to a document on a website via this code:
Private Sub combtn_rule_14_whole_Click()
Application.DisplayAlerts = False
On Error Resume Next
ActiveWorkbook.FollowHyperlink
Address:="http://www.pge.com/tariffs/pdf/GR14.pdf", _
NewWindow:=True
Application.DisplayAlerts = True
End Sub
However, when users click on this link, it produces an a "display alert" error. To fix this, I commented out the display alerts, so the code looks like this:
Private Sub combtn_rule_14_whole_Click()
On Error Resume Next
ActiveWorkbook.FollowHyperlink
Address:="http://www.pge.com/tariffs/pdf/GR14.pdf", _
NewWindow:=True
End Sub
When users click on the button now, there is no action that takes place.
I try using a different method: instead of using the button, I placed a hyperlink right in the cell. The link work. However, it uses the same browser. User have to use the back button. What can I do to either fix the first scenario with the button? If not, how can I get the link to open up in a new window. Thanks.
Mark
I am trying to run an excel workbook (with 7 sheets) via a webbrowser. Users have to enable macros to run three particular sheets on this workbook. There's a button on these sheets that hyperlinks to a document on a website via this code:
Private Sub combtn_rule_14_whole_Click()
Application.DisplayAlerts = False
On Error Resume Next
ActiveWorkbook.FollowHyperlink
Address:="http://www.pge.com/tariffs/pdf/GR14.pdf", _
NewWindow:=True
Application.DisplayAlerts = True
End Sub
However, when users click on this link, it produces an a "display alert" error. To fix this, I commented out the display alerts, so the code looks like this:
Private Sub combtn_rule_14_whole_Click()
On Error Resume Next
ActiveWorkbook.FollowHyperlink
Address:="http://www.pge.com/tariffs/pdf/GR14.pdf", _
NewWindow:=True
End Sub
When users click on the button now, there is no action that takes place.
I try using a different method: instead of using the button, I placed a hyperlink right in the cell. The link work. However, it uses the same browser. User have to use the back button. What can I do to either fix the first scenario with the button? If not, how can I get the link to open up in a new window. Thanks.
Mark