Results 1 to 10 of 10

Thread: [RESOLVED] space path location

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    1,370

    Resolved [RESOLVED] space path location

    How to tell the users with message box that the path location having a space?

    rlyr.file = Dir1.Path & "\" & File1.List(File1.ListIndex)

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

    Re: space path location

    What?

    I don't understand the question.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    1,370

    Re: space path location

    I have path location like this

    Code:
    C:\Database\BOUNDARIES\TKSSBlock C
    This path location having an empty space between text. How to pop up a message box to tell user that, "no empty space is allowed in the path location, please rename the folder."

  4. #4
    Member
    Join Date
    Dec 2007
    Posts
    57

    Re: space path location

    Code:
    If InStr(1, Dir1.Path, " ") > 0 Then
        MsgBox "no empty space is allowed in the path location, please rename the folder.", vbExclamation, "Error"
    End If

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

    Re: space path location

    Ah, gotcha.

    Does your program allow them to make the folder in the first place or is this a folder they make themselves, and then in your program, select?

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    1,370

    Re: space path location

    Quote Originally Posted by Hack
    Ah, gotcha.

    this a folder they make themselves, and then in your program, select?
    Yes, the make the folder and I select the folder. I use this code to select the folder Dir1.Path & "\" & File1.List(File1.ListIndex)

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

    Re: [RESOLVED] space path location

    Then before you make the folder check for a space. If there is one, don't make it.

  8. #8

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    1,370

    Re: [RESOLVED] space path location

    Thank you, I already solve this problem

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

    Re: [RESOLVED] space path location

    Quote Originally Posted by matrik02
    Thank you, I already solve this problem
    What did you do?

  10. #10

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    1,370

    Re: [RESOLVED] space path location

    Quote Originally Posted by Hack
    What did you do?
    Used reinholdmesne code, Actually I am not create the folder, the folder was create manually, I just select the folder from VB.

    Code:
    If InStr(1, Dir1.Path, " ") > 0 Then
        MsgBox "no empty space is allowed in the path location, please rename the folder.", vbExclamation, "Error"
    End If

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