Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Making the worksheet.hyperlinks.add method work!

I'm following this MSDN example:
http://msdn.microsoft.com/en-us/libr...( VS.80).aspx

Here is my code snippet:
Excel.Range values = currentworksheet.get_Range("A" +
currentlinenumber.ToString(),
(Excel.Range)currentworksheet.Cells[currentlinenumber, printstrings.Length]);
values.Value2 = printstrings;
currentworksheet.Hyperlinks.Add(values, hyperlink, "", "", "");

The last line incites a COMException: "Exception from HRESULT: 0x800A03EC";
not very descriptive and a quick search doesn't yield a lot.

Thought I would hit you guys up and get some eyes on it and see if anyone
can point out something obvious and hopefully simple that I need to fix?

Much thanks!
Dana
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Making the worksheet.hyperlinks.add method work!

Alternatively, another solution I tried was to insert text to the cell that
is of the form:

range.values = "=HYPERLINKS(\"" + address + "\", \"" + text + "\")';

This sorta work... when the worksheet opens, though, the literal string is
displayed in the cell, and only if I select the cell, then select somewhere
in the string in the text bar up top, then click somewhere else in the
worksheet, only then does the text display correctly as hyperlinked.

Any clues on making it display correctly from the get go?
TIA!
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
Making Application.CommandBars.ExecuteMso method work in 2007 JeffreyW Excel Programming 7 December 11th 07 09:01 PM
GetObject method not work after Call Shell Method ben Excel Programming 8 February 21st 06 03:45 PM
Why QUIT method doesn't work after COPY method? surotkin Excel Programming 3 October 26th 05 04:32 PM
Making Hyperlinks Unavailable David W[_3_] Excel Programming 1 July 11th 03 05:36 PM
Making VB PasteSpecial method to work the same as Excels Application John[_35_] Excel Programming 1 July 10th 03 05:20 PM


All times are GMT +1. The time now is 04:51 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"