Re: How do I create a new folder using a macro

Tech-Archive recommends: Speed Up your PC by fixing your registry



Take a look at the MkDir method in VBA Help.

Const sPATH As String = "C:/Program Files/"
MkDir sPath & Range("A1").Value


In article <89E33261-010F-44D0-A9C2-D285F052B47E@xxxxxxxxxxxxx>,
rsabot <rsabot@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

> I need to create a new folder using a folder name in a given cell (ex: A1).
> Can I create a macro that will make the new folder (ex: c:/program files/A1)?
>
> thanks in advance
.



Relevant Pages

  • Re: MkDir Simply Not Creating Folders
    ... Does the sProfileName contain a leading backslash? ... MkDir sPath & sProfileName ... The folder doesn't already exist and it ... 'Exit Sub ...
    (microsoft.public.excel.programming)
  • Re: MkDir Simply Not Creating Folders
    ... Is there an issue with MkDir? ... I just want to create a "test" folder on the C drive and it's ... MkDir sPath & sProfileName ... 'Exit Sub ...
    (microsoft.public.excel.programming)
  • Re: MkDir Simply Not Creating Folders
    ... and sProfileName contains a subfolder name, ... MkDir sPath & sProfileName ... The folder doesn't already exist and it ... 'Exit Sub ...
    (microsoft.public.excel.programming)
  • Re: MkDir Simply Not Creating Folders
    ... I just want to create a "test" folder on the C drive and it's ... MkDir sPath & sProfileName ... 'Exit Sub ...
    (microsoft.public.excel.programming)
  • Re: MkDir Simply Not Creating Folders
    ... I just want to create a "test" folder on the C drive and it's ... MkDir sPath & sProfileName ... 'Exit Sub ...
    (microsoft.public.excel.programming)