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