Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating Hyperlinks in Excel
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Creating Hyperlinks in Excel
Divers
Thread ID:
00405617
Message ID:
00405617
Vues:
66
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform