The following code opens the webpage mentioned in the code when the macro button is clicked. But each time the macro button is clicked it opens the same webpage in a new tab.
How could it be changed so that each time the macro button is clicked it does not open in a new tab, instead opens the webpage from the same tab.
Any help would be kindly appriciated.
Thanks in advance.
Code: Select all
Sub Google()
ActiveWorkbook.FollowHyperlink Address:="http://www.google.com", NewWindow:=True
End Sub
Code: Select all
Sub Google()
ActiveWorkbook.FollowHyperlink Address:="http://www.google.com", NewWindow:=False
End Sub