Why I can't create Folder on Desktop by VB

Discussion in 'Programming' started by riteshtechie, Mar 10, 2010.

  1. #1
    I don't know what went wrong, but I am not able to create a folder using the following code

    My.Computer.FileSystem.CreateDirectory(Environ("%UserProfile%") & "\Desktop\abc")
    Code (markup):

     
    riteshtechie, Mar 10, 2010 IP
  2. NeoCambell

    NeoCambell Peon

    Messages:
    456
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try
    My.Computer.FileSystem.CreateDirectory(Environment.GetEnvironmentVariable("USERPROFILE") + "\Desktop\abc")
    Code (markup):
     
    NeoCambell, Mar 10, 2010 IP