Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Creating a folder


When a workbook is opened for the first time, I want to automate the
creation of a "Business Cases" folder on the user's C drive.

Can anyone guide me with the required code to:

Test if "C:/Business Cases" exists, and if it doesn't create the
folder

Any assistance much appreciated

Cheers

Peter (new to VBA...slowly getting there...)


--
peter.thompson
------------------------------------------------------------------------
peter.thompson's Profile: http://www.excelforum.com/member.php...o&userid=29686
View this thread: http://www.excelforum.com/showthread...hreadid=501311

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Creating a folder

In the workbook code area place this ........


Private Sub Workbook_Open()
If Dir("C:\Business Cases\", vbDirectory) = "" Then MkDir "C:\Business
Cases"
End Sub


--
Cheers
Nigel



"peter.thompson"
<peter.thompson.21m19a_1137217802.0932@excelforu m-nospam.com wrote in
message news:peter.thompson.21m19a_1137217802.0932@excelfo rum-nospam.com...

When a workbook is opened for the first time, I want to automate the
creation of a "Business Cases" folder on the user's C drive.

Can anyone guide me with the required code to:

Test if "C:/Business Cases" exists, and if it doesn't create the
folder

Any assistance much appreciated

Cheers

Peter (new to VBA...slowly getting there...)


--
peter.thompson
------------------------------------------------------------------------
peter.thompson's Profile:

http://www.excelforum.com/member.php...o&userid=29686
View this thread: http://www.excelforum.com/showthread...hreadid=501311



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Creating a folder


That did the trick!

Thanks a bunch

Peter


--
peter.thompson
------------------------------------------------------------------------
peter.thompson's Profile: http://www.excelforum.com/member.php...o&userid=29686
View this thread: http://www.excelforum.com/showthread...hreadid=501311

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a folder dan Excel Discussion (Misc queries) 5 September 27th 07 04:12 PM
Creating a new folder that does not already exsit. Ryan Excel Discussion (Misc queries) 3 July 16th 07 10:10 PM
Creating Folder Folder in My Documents VBA - HELP Ali[_4_] Excel Programming 3 July 25th 05 02:17 PM
Macro for creating folder RG[_2_] Excel Programming 1 December 29th 03 06:53 PM
creating folder Lawson Excel Programming 1 December 3rd 03 01:16 AM


All times are GMT +1. The time now is 01:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"