Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel URL in cell, How to read it into VFP
Message
From
24/08/2007 16:14:13
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01250060
Message ID:
01250339
Views:
27
>>>I have an Excel sheet which stores amont other things URL to web sites
>>>They show a ball like picture and whren you click on it IE navigates to the site
>>>
>>>I have to read it in in a VFP prg
>>>but the value of the cell is blank
>>>
>>>how do I get to that value?
>>>
>>>
>>>I tried oExcel.Range("O141").Hyperlinks.Item but that does not do it either. It's an object though.
>>>
>>>
>>>Thanks
>>>
>>>Peter
>>
>>
>>Local ox As excel.Application
>>ox = Createobject("excel.application")
>>With ox
>>  .Workbooks.Open(m.lcXLS)
>>  .Visible = .T.
>>  With .ActiveWorkbook.Activesheet
>>    For ix = 1 To .UsedRange.Hyperlinks.Count
>>      ? .UsedRange.Hyperlinks(m.ix).Address, .UsedRange.Hyperlinks(m.ix).TextToDisplay
>>    Endfor
>>  Endwith
>>Endwith
>>
>Cetin
>
>I get the error 'OLE error code 0x80020006: Unknown name' on the UsedRange command. using Excel97.

Chris,
I currently have excel2003 but as far as I remember UsedRange is a known name in excel97 too. Doesn't VBA help list that?

In case it really doesn't have that property, then as I rememebr it supported SpecialCells(xlLastCell) to get bottom,right used cell. From that you could get address (or simply use range("1:65536"))
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform