Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: M M
  Where is M M?
 Delhi
 India
 M M
 To: surinder singh
  Where is surinder singh?
 mumbai
 India
 surinder singh
 Tags
Subject: RE: Value Retention between VFP and Excel
Thread ID: 188275 Message ID: 188817 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Classes and Objects
Date: Tuesday, August 12, 2008 8:43:37 AM         
   


> > Thanx for the solution. Your code is working and I am able to track the values of the variable. I think I need another help from u.
> >
> > As per the following code
> > m.lnResult = filetostr("c:\myVBAoutput.txt")
> >
> > I am opening the file in drive c:, but it may so happen that this drive is not available in the user machine. Hence I need to open my file in the path where my VFP application is running. Say for example my VFP application is running as
> >
> > D:\MyVfpApplication
> >
> > Then I need to create my text file in this path only.
> >
> > Is there any means to know the working drives(Fixed Drives) available in my computer from the Excel Form.
> >
> > Cheers
> > Madhu
> >
> >
>
>
> it is quite simple.
>
> From what path you opening/saving your excel file??
> you can get that path by using CURDIR() function in VBA and in foxpro sys(0)+curdir()
>
> VBA code
> MyFile = CURDIR() + "\whateveryouwant1.txt"
>
> in foxpro
>
> fielTostr(sys(5) + CURDIR() + "\whateveryouwant1.txt")
> 

>
>
>
> -----------------------------------------------------------------------------------------------
> Regards
> Surinder Singh
> Email: sur200@indiatimes.com
> Check my blog for details: http://weblogs.foxite.com/sur200
> ----------------------------------------------------------------------------------------
> *If you understand what you're doing, then you're not learning anything.


There is a problem if I use the above code, I have tried with curdir() but in VB it was returning the Path "C:\Documents and Settings\madhu\My Documents\myVBAoutput.txt". That is the reason why I wanted to use my application path.

Is there any means of sending my VFP application path to the Excel Form and access it from the FORM.

Cheers
Madhu

ENTIRE THREAD

Value Retention between VFP and Excel Posted by M M @ 8/8/2008 2:05:03 PM
RE: Value Retention between VFP and Excel Posted by tushar @ 8/8/2008 2:12:22 PM
RE: Value Retention between VFP and Excel Posted by M M @ 8/11/2008 11:32:13 AM
RE: Value Retention between VFP and Excel Posted by surinder singh @ 8/11/2008 12:42:30 PM
RE: Value Retention between VFP and Excel Posted by M M @ 8/11/2008 3:46:54 PM
RE: Value Retention between VFP and Excel Posted by surinder singh @ 8/12/2008 6:51:02 AM
RE: Value Retention between VFP and Excel Posted by M M @ 8/12/2008 7:49:05 AM
RE: Value Retention between VFP and Excel Posted by surinder singh @ 8/12/2008 8:07:52 AM
RE: Value Retention between VFP and Excel Posted by M M @ 8/12/2008 8:43:37 AM
RE: Value Retention between VFP and Excel Posted by surinder singh @ 8/12/2008 8:53:56 AM
RE: Value Retention between VFP and Excel Posted by M M @ 8/12/2008 3:44:43 PM
RE: Value Retention between VFP and Excel Posted by M M @ 8/13/2008 4:58:17 PM
RE: Value Retention between VFP and Excel Posted by surinder singh @ 8/13/2008 6:22:14 PM
RE: Value Retention between VFP and Excel Posted by M M @ 8/18/2008 7:39:22 AM
RE: Value Retention between VFP and Excel Posted by tushar @ 8/18/2008 7:46:44 AM
RE: Value Retention between VFP and Excel Posted by M M @ 8/18/2008 1:50:07 PM
RE: Value Retention between VFP and Excel Posted by tushar @ 8/18/2008 3:09:58 PM
RE: Value Retention between VFP and Excel Posted by tushar @ 8/12/2008 9:28:09 AM