Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Another hyperlink quandry:

Hi all,

I've looked around and tried to apply the examples listed here, but I guess
I just don't get it. I have a line of text that I'm parsing for inclusion
into seperate cells in a sheet, one of which should be a hyperlink. When I
try to paste the info into the appropriate cell thusly:

With Worksheets(1)
.Range(.Cells(iRow2, 4)).Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
trim(tText2), TextToDisplay:= _
trim(tText2), NewWindow:=True
End With

I get a 1004 error. I thought the issue might be because the variable,
tText2 is a Variant, so I moved it over to a different variable I defined as
type Hyperlink, but now I get a "Run time error 91: Object variable or With
block variable not set."

Am I supposed to just put the info in, then go back and format it? Sorry I
have to ask.....thanks in advance for any clues......
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Another hyperlink quandry:

If you MSGBOX(TRIM(tText2)) what do you see??
--
Gary''s Student - gsnu200759


"pvdalen" wrote:

Hi all,

I've looked around and tried to apply the examples listed here, but I guess
I just don't get it. I have a line of text that I'm parsing for inclusion
into seperate cells in a sheet, one of which should be a hyperlink. When I
try to paste the info into the appropriate cell thusly:

With Worksheets(1)
.Range(.Cells(iRow2, 4)).Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
trim(tText2), TextToDisplay:= _
trim(tText2), NewWindow:=True
End With

I get a 1004 error. I thought the issue might be because the variable,
tText2 is a Variant, so I moved it over to a different variable I defined as
type Hyperlink, but now I get a "Run time error 91: Object variable or With
block variable not set."

Am I supposed to just put the info in, then go back and format it? Sorry I
have to ask.....thanks in advance for any clues......

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Another hyperlink quandry:


Try it without ", NewWindow:= True"
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)


"pvdalen"
wrote in message
Hi all,
I've looked around and tried to apply the examples listed here, but I guess
I just don't get it. I have a line of text that I'm parsing for inclusion
into seperate cells in a sheet, one of which should be a hyperlink. When I
try to paste the info into the appropriate cell thusly:

With Worksheets(1)
.Range(.Cells(iRow2, 4)).Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
trim(tText2), TextToDisplay:= _
trim(tText2), NewWindow:=True
End With

I get a 1004 error. I thought the issue might be because the variable,
tText2 is a Variant, so I moved it over to a different variable I defined as
type Hyperlink, but now I get a "Run time error 91: Object variable or With
block variable not set."

Am I supposed to just put the info in, then go back and format it? Sorry I
have to ask.....thanks in advance for any clues......
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Another hyperlink quandry:

I see the text contained in the variable tText2, within quotes.

"Gary''s Student" wrote:

If you MSGBOX(TRIM(tText2)) what do you see??
--
Gary''s Student - gsnu200759


"pvdalen" wrote:

Hi all,

I've looked around and tried to apply the examples listed here, but I guess
I just don't get it. I have a line of text that I'm parsing for inclusion
into seperate cells in a sheet, one of which should be a hyperlink. When I
try to paste the info into the appropriate cell thusly:

With Worksheets(1)
.Range(.Cells(iRow2, 4)).Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
trim(tText2), TextToDisplay:= _
trim(tText2), NewWindow:=True
End With

I get a 1004 error. I thought the issue might be because the variable,
tText2 is a Variant, so I moved it over to a different variable I defined as
type Hyperlink, but now I get a "Run time error 91: Object variable or With
block variable not set."

Am I supposed to just put the info in, then go back and format it? Sorry I
have to ask.....thanks in advance for any clues......

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Another hyperlink quandry:

I tried; same thing. Thanks for the thought, though.....

"Jim Cone" wrote:


Try it without ", NewWindow:= True"
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)


"pvdalen"
wrote in message
Hi all,
I've looked around and tried to apply the examples listed here, but I guess
I just don't get it. I have a line of text that I'm parsing for inclusion
into seperate cells in a sheet, one of which should be a hyperlink. When I
try to paste the info into the appropriate cell thusly:

With Worksheets(1)
.Range(.Cells(iRow2, 4)).Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
trim(tText2), TextToDisplay:= _
trim(tText2), NewWindow:=True
End With

I get a 1004 error. I thought the issue might be because the variable,
tText2 is a Variant, so I moved it over to a different variable I defined as
type Hyperlink, but now I get a "Run time error 91: Object variable or With
block variable not set."

Am I supposed to just put the info in, then go back and format it? Sorry I
have to ask.....thanks in advance for any clues......



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Another hyperlink quandry:


The address argument requires a "string".
So change Selection to Selection.Address and omit the newwindow part.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)


"pvdalen"
wrote in message
I tried; same thing. Thanks for the thought, though.....



"Jim Cone" wrote:
Try it without ", NewWindow:= True"
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
100% quandry Mojo Excel Discussion (Misc queries) 6 June 1st 09 01:56 PM
COUNTIF quandry JohnLute Excel Worksheet Functions 6 August 20th 07 06:29 PM
Macro Quandry Desiree Excel Discussion (Misc queries) 2 July 29th 05 01:32 PM
macro quandry.....?? Daesthai Excel Discussion (Misc queries) 2 June 29th 05 07:29 PM
SQL Query Quandry Laphan[_2_] Excel Programming 7 April 20th 04 11:33 AM


All times are GMT +1. The time now is 01:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"