This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.


Simple really when you know where to look...
Thanks very much Greg!
 
Cheers, Dave

-----Original Message-----
From: Driver, Greg 9434 [mailto:[EMAIL PROTECTED]] 
Sent: 11 December 2001 15:57
To: 'Eagle, David A'; '[EMAIL PROTECTED]'
Subject: RE: MI-L FileOpenDlg



David, 

Can't you use PathToFileName$() function?  This returns a filename given a
file specification as in: 

sTab_name = PathToFileName$(sTab_Path) 


Greg 

        -----Original Message----- 
From:   Eagle, David A [SMTP:[EMAIL PROTECTED]] 
Sent:   Tuesday, December 11, 2001 15:44 
To:     '[EMAIL PROTECTED]' 
Subject:        MI-L FileOpenDlg 

        Listers, 

        I'm currently writing a small application. I am using FileOpenDlg to

navigate to a *.Tab file, I then want update an EditText box with that table

name. I can manage to update it with the path but I don't want to show the 
full path, only the file name. I've included the snippet of code below... 

        To strip out the filename only I am trying to search for the first
"\" from 
the right of the string, but I'm sure I am barking up the wrong tree, as all

sTab_Name is feeding me so far is "TAB"?! 

        Any ideas? 


        Sub Browse_Open 
        Dim sTab_Path As String 
        Dim sTab_Name As String 
                sTab_Path = FileOpenDlg("C:\","","TAB","Open Gazetteer 
Table") 
                sTab_Name = Right$(sTab_Path, InStr(1,sTab_Path,"\") ) 
                                Print sTab_Path 
                                Print sTab_Name 

                                Alter Control 900 Value sTab_Path 
End Sub 


        Best Regards, 
David 


        ---------------------------------------------- 
David A. Eagle (GIS Consultant) 
WS Atkins Consultants Ltd 
Stafford Park 13, Telford 
TF3 3AZ, Great Britain 
Tel: (01952) 201234 

        < www.wsatkins.com <www.wsatkins.com>  > 



        This email and any attached files are confidential and copyright
protected. 
If you are not the addressee, any dissemination of this communication is 
strictly prohibited. Unless otherwise expressly agreed in writing, nothing 
stated in this communication shall be legally binding. 




        
_______________________________________________________________________ 
List hosting provided by Directions Magazine | www.directionsmag.com | 
To unsubscribe, send e-mail to [EMAIL PROTECTED] and 
put "unsubscribe MapInfo-L" in the message body. 


Internet communications are not secure and therefore Surrey Police does not
accept legal responsibility for the contents of this message.  This email
and any attachments may be confidential. They may contain privileged
information and are intended for the named addressee (s) only. They must not
be distributed without our consent. If you are not the intended recipient,
please notify us immediately and delete the message and any attachments from
your computer, do not disclose, distribute, or retain this email or any part
of it. Unless expressly stated, opinions in this email are those of the
individual sender, and not of Surrey Police. We believe but do not warrant
that this e-mail and any attachments are virus free. You must therefore take
full responsibility for virus checking. Surrey Police reserves the right to
monitor all email communications through their networks.




This email and any attached files are confidential and copyright protected.
If you are not the addressee, any dissemination of this communication is
strictly prohibited. Unless otherwise expressly agreed in writing, nothing
stated in this communication shall be legally binding.





_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to