Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Cetin Basoz
  Where is Cetin Basoz?
 Izmir
 Turkey
 Cetin Basoz
 To: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 Tags
Subject: RE: IntelliSense not Work on Dot
Thread ID: 228297 Message ID: 228342 # Views: 2 # Ratings: 3
Version: Visual FoxPro 9 Category: Projects and Design
Date: Monday, May 18, 2009 11:56:57 AM         
   


> >
> >
loXS As Excel._Workbook

> >
>
> Hi Cetin -
>
> That's interesting!, I did not know about "... As Excel._Workbook".
>
> Did not get it to work yet, though...
> That is, it does work in my tests when the "Microsoft Office 11.0 Type Library" is loaded in the Intellisenese Manager "Types" tab for MS Office 2003, or "Microsoft.Office.Interop.Excel, Version=12..." for MS Office 2007.
>
> But not for a default Vfp9 setup with none of them loaded yet, or when I remove the existing TLBs in the Intellisense manager.
> My steps were:
>
> - Start a VFP9 IDE session, nothing from MSOffice in the TypeLibraries list (default)
> - In the Command Window do a "Modify Command"
> - In the Code Editor I typed:
>
> LOCAL loXS As Excel._Workbook
> loXS.
> 

>
> IntelliSense did not jump in at the dot (unless one of the mentioned TLBs was in the IntelliSense Manager "Types" list, or being opened in the Object Browser)
>
>
> TIA
> -Stefan

Oh yes it is a little tricky to put it into work but the trick is almost always transparent so I forgot to add details (because the natural expected sequence is the trick itself and doesn't need the TLB loaded):

-Define Excel.Application and make a call to that first (having excel.application and making a call to that is expected action and is the trick for other intellisense)

local loX as Excel.application, loXS as Excel._Workbook 
loX. && it is not important if you createobject or not just invoke this one once
loXS. && now works for workbook


PS: loXS as Excel.Workbook would work the same way. Interesting I didn't notice myself the answer was inwoking excel.application intellisense first (maybe because I don't pay attention to sequence of code which I sort of 'naturally' type). Thanks for making me aware of what I were doing:)

Cetin Basoz

.Net has got better.Think about moving - check my blog:
Blog (main)
Blog (mirror)

ENTIRE THREAD

IntelliSense not Work on Dot Posted by Khurram Tahir @ 5/18/2009 7:15:27 AM
RE: IntelliSense not Work on Dot Posted by Stefan Wuebbe @ 5/18/2009 9:52:16 AM
RE: IntelliSense not Work on Dot Posted by Ammar Hadi @ 5/18/2009 10:57:27 AM
RE: IntelliSense not Work on Dot Posted by Stefan Wuebbe @ 5/18/2009 11:01:22 AM
RE: IntelliSense not Work on Dot Posted by Ammar Hadi @ 5/18/2009 11:16:28 AM
RE: IntelliSense not Work on Dot Posted by Cetin Basoz @ 5/18/2009 11:05:18 AM
RE: IntelliSense not Work on Dot Posted by Stefan Wuebbe @ 5/18/2009 11:44:11 AM
RE: IntelliSense not Work on Dot Posted by Cetin Basoz @ 5/18/2009 11:56:57 AM
RE: IntelliSense not Work on Dot Posted by Stefan Wuebbe @ 5/18/2009 12:07:09 PM