+ Reply to Thread
Results 1 to 4 of 4

Create VB shortcut to a folder

  1. #1
    Registered User
    Join Date
    02-19-2009
    Location
    Enschede NL
    MS-Off Ver
    Excel 2003
    Posts
    2

    Create VB shortcut to a folder

    Hello,

    I'm using Excel 2003 and want to programmaticly create shortcuts to folders. When I try the program below it works when the destiny is a file, but I need to open Windows Explorer with the shortcut.
    When using 'my' code a shortcut is placed in the right folder but when opening it a window pops up and asks with what application I want to open it, instead of Windows Explorer with the target folder.
    Looking at the properties of that shortcut it does say it's a folder-type.

    So, what is going wrong???

    Greetz, CJ.



    The shortcuts must be placed in one folder: C:\destiny\~shortcuts\
    The folders themselves are in: C:\customers\john doe\

    I've marked original with 'ORIGINAL and my work with 'MY EDIT


    Please Login or Register  to view this content.
    Last edited by CJPNL; 03-18-2010 at 11:28 AM.

  2. #2
    Forum Contributor
    Join Date
    12-03-2009
    Location
    Providence RI
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    260

    Re: Howto create a VB shortcut to a folder?

    Before a mod gets to you.... Can you please place [ code] [ /code] around your code in your post?

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,997

    Re: Howto create a VB shortcut to a folder?

    Your szBookFullName appears to be missing a drive letter. (your code works fine for me)
    Everyone who confuses correlation and causation ends up dead.

  4. #4
    Registered User
    Join Date
    02-19-2009
    Location
    Enschede NL
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Create VB shortcut to a folder

    Placed the [code] things and it does look much better!
    And yes, filling in the missing drive-letter solves the problem!

    Thanx.
    Last edited by CJPNL; 03-18-2010 at 11:28 AM.

+ 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