+ Reply to Thread
Results 1 to 4 of 4

Find current directory - Optional string

  1. #1
    Forum Contributor
    Join Date
    01-15-2010
    Location
    Jhb, South Africa
    MS-Off Ver
    2007, 2010, 2016
    Posts
    275

    Find current directory - Optional string

    Hi Guys,

    Having problems so late in the afternoon...

    I have a piece of code that is suppose to defualt to the file's current directory if not specified but for some reason this does not work...

    Am I refering to ismissing() incorrect or what?

    Please Login or Register  to view this content.
    Last edited by Jacques Grobler; 10-03-2011 at 01:32 AM.
    Jacques


  2. #2
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Find current directory - Optional string

    Firstly, the "/" needs to be "\"

    Since newDir has been defined as a string, using this would solve the issue.

    Please Login or Register  to view this content.

  3. #3
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: Find current directory - Optional string

    Just to elaborate on the previous reply, IsMissing() is used to test Variant types; you can't use it (succesfully) on String types. Have a look at the "IsMissing Function" topic in your VBA helpfile for more information.
    Hope that helps,

    Colin

    RAD Excel Blog

  4. #4
    Forum Contributor
    Join Date
    01-15-2010
    Location
    Jhb, South Africa
    MS-Off Ver
    2007, 2010, 2016
    Posts
    275

    Re: Find current directory - Optional string

    Hahaha, finger trouble... Thanks for the help quekbc,

    Colin, thanks for the clarification.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1