From: Brian on 18 Mar 2010 12:40 To be honest I am not sure why it would not open it in a new window. It does for me, I wonder if that is just something to do with the brower where it is set to automatically open new windows as a new tab if a window is already open? As I said, mine opens fine so I do not think it is a excel issue. Also, as far as I know newwindow is not a valid variable for the hyperlinks function. "PPL" wrote: > Thanks Brian, > That works well. However I need the file to open in a new window. > > I've tried appending NewWindow:=True to your Hyperlinks.Add method as > follows: > > ActiveSheet.Range("A19").Select > > With ActiveSheet > > .Hyperlinks.Add Anchor:=Selection, Address:= _ > > "c:\1\test.htm", TextToDisplay:="Test", NewWindow:="True" > > End With > > End Sub > > I'm getting Runtime Error 1004: Application defined or Object defined error. > > Is there any other way of achieving the same result please? > > Thanks again > Phil > > > "Brian" <Brian(a)discussions.microsoft.com> wrote in message > news:2D58C537-D2BB-40D7-BE15-4F5CD9B07276(a)microsoft.com... > > Try.... > > > > Sub Test2() > > > > ActiveSheet.Range("A19").Select > > With ActiveSheet > > .Hyperlinks.Add Anchor:=Selection, Address:= _ > > "c:\1\test.htm", TextToDisplay:="Test" > > End With > > End Sub > > > > "PPL" wrote: > > > >> Excel 2002 / 2003. > >> I'm trying to create a hyperlink in cell A19 such that the result opens > >> in a > >> new window. I'm using > >> > >> Range("A19").Select > >> ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="c:\test.htm", > >> NewWindow:=True, AddHistory:=True > >> > >> I'm getting Runtime Error 1004: Application defined or Object defined > >> error > >> > >> Anyone any idea where am I going wrong ??? > >> > >> TIA > >> > >> > >> > >> > >> > >> . > >> > > > > > . >
First
|
Prev
|
Pages: 1 2 Prev: Filling right header/footer with barcode Next: Create a list of pre-named tabs |