Results 1 to 2 of 2

Thread: Simple get filename and foldername

  1. #1

    Thread Starter
    Fanatic Member staticbob's Avatar
    Join Date
    Jan 2005
    Location
    Manchestershire, UK Cabbage: I do
    Posts
    619

    Simple get filename and foldername

    Guys, sorry, its been a while...

    I need to get a filename from the user, and also store its folder. I was trying with this but I guess this dialogue just returns the filename, dont want to have to trim it...

    'Select XML CA definition file
    Set objDialog = CreateObject("UserAccounts.CommonDialog")
    intResult = objDialog.ShowOpen
    If Not intResult = 0 Then
    str_xmlfilename = objDialog.filename
    str_xmlfoldername = ""
    End If

    Whats the simple way of doing this?

    Bob
    "I dislike 7 am. If 7 am were a person, I would punch 7 am in the biscuits." - Paul Ryan, DailyRamblings

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Simple get filename and foldername

    Quote Originally Posted by staticbob View Post
    I need to get a filename from the user, and also store its folder. I was trying with this but I guess this dialogue just returns the filename
    I'm confused. You want to get a filename from the user but you don't want to use a control that returns the filename?

    What am I missing here?

    Also, what does "store its folder" mean? Lets say the filename is c:\folder\hack.txt

    Do you want to store c:\folder in a variable or something?

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