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.

Reply via email to