Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel URL in cell, How to read it into VFP
Message
De
24/08/2007 13:02:14
 
 
À
24/08/2007 11:45:11
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01250060
Message ID:
01250266
Vues:
54
To get intellisense for an object that occurs pretty far down the hiarchy, use a more local reference:
oHL = oExcel.ActiveSheet.Range("O141").Hyperlinks
oHL.
should now show the properties.


>hyperlinks is an object but has no intellisens:
>
>CLEAR
>LOCAL oExcel as Excel.Application && to make intellisense happy
>
>oExcel=CREATEOBJECT("Excel.Application")
>oExcel.visible= .F.
>oExcel.DisplayAlerts = .F.
>lcFileName=[c:\vApps\vCMC\Imports\MasterList.xls]
>oW=oExcel.Workbooks.Open(lcFileName)
>
>?oExcel.ActiveSheet.Range("O141").Hyperlinks   <<<---- returns an object but adding a dot shows no Intellisense
>
>?oExcel.ActiveSheet.Range("O141").Hyperlinks.Item(1) <<< --- ole eror code 0x8002000b invalid index
>
>
>
>
>
>>>I get this error:
>>>
>>>member ITEM does not evaluate to an object
>>
>>It works fine for me in Excel 2007. Anyway try
>>
>>? oSheet.Range("O141").Hyperlinks.Item(1).Address
>>
If it doesn't work, use Intellisense to pinpointe where it brakes.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform