Results 1 to 5 of 5

Thread: HEY YOU! yeah you, Can you help me?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Posts
    17

    Question

    I am making a program that requires the common dialog save box, but I want the file chosen to be made local. Example.

    the user chooses C:\hotdog\freekho.txt

    the program turns it to "freekho.txt" by cutting out the location.. Please help. Wrack your brains! I must know... The fate of the world hangs in the balance...

  2. #2

  3. #3
    Junior Member
    Join Date
    Jan 2000
    Location
    MN, USA
    Posts
    25
    What do you use to get the filename?? When I use:

    CommonDialog1.showopen 'or showsave
    MsgBox CommonDialog1.filename

    It returns the full path... Good luck

  4. #4
    Hyperactive Member
    Join Date
    Mar 2000
    Posts
    292
    I"m not sure if I'm reading your question wrong but just find the last instance of "/" then take everything after it using Right or Mid.
    "People who think they know everything are a great annoyance to those of us who do."

  5. #5
    Member
    Join Date
    Jun 2000
    Posts
    34
    CommonDialog1.ShowOpen

    To find out the full name (path & filename) use:
    MsgBox CommonDialog1.FileName

    To find out only the file name (w/o path) use:
    MsgBox CommonDialog1.FileTitle

    To find out only the path use:
    MsgBox Left(CommonDialog1.FileName, Len (CommonDialog1.FileName) - Len(CommonDialog1.FileTitle))


    [Edited by vbDan on 07-01-2000 at 09:47 AM]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width