Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Making Application.CommandBars.ExecuteMso method work in 2007 | Excel Programming | |||
GetObject method not work after Call Shell Method | Excel Programming | |||
Why QUIT method doesn't work after COPY method? | Excel Programming | |||
Making Hyperlinks Unavailable | Excel Programming | |||
Making VB PasteSpecial method to work the same as Excels Application | Excel Programming |