Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating Hyperlinks in Excel
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Creating Hyperlinks in Excel
Miscellaneous
Thread ID:
00405617
Message ID:
00405617
Views:
65
I am trying to add a function to my automatically created reports. I am typeing to add a hyperlink in the summary tab that takes the user to the detail sheet since my spreadsheet has over 22 tabs. I have tried the following code to no avail. The Visual Basic code for the operation I want to preform is

ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
"Sheet1!A20"

Here is the FoxPro code to preform the test

xl = CREATEOBJECT("excel.application")
xl.VISIBLE = .T.
xl.workbooks.ADD

xl.cells(1,1).value = "Test"
xl.cells(1,1).select
xl.activesheet.Hyperlinks.Add ("a1","","Sheet1!A20")

I recieve the error "OLE error code 0x80020005: Type Mismatch"

Any help would be appreciated,
TIA
Jeff Pearce
Next
Reply
Map
View

Click here to load this message in the networking platform