Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Create folders on a shared drive with a macro

I would like a macro that would create a folder on one of our shared
drives and would name this folder based on what is in one of the cells
in the current worksheet. Does anyone have a clue how to do this?
Any help is appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 227
Default Create folders on a shared drive with a macro

Hi Michael

Sub test()
Dim x As String
x = "R:\MyExistingFolder\" & Range("A1")
On Error Resume Next
MkDir x
End Sub

--
XL2002
Regards

William



"Michael McClellan" wrote in message
om...
| I would like a macro that would create a folder on one of our shared
| drives and would name this folder based on what is in one of the cells
| in the current worksheet. Does anyone have a clue how to do this?
| Any help is appreciated.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Create folders on a shared drive with a macro

Michael,

This creates a folder on the D drive.

Dim oFSO As Object
Dim oFolder As Object
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFolder = oFSO.CreateFolder("D:\" & ActiveSheet.Range("A1"))

Haven't tested on a shared drive, but as long as you have access, and the
drive is mapped, it should work.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Michael McClellan" wrote in message
om...
I would like a macro that would create a folder on one of our shared
drives and would name this folder based on what is in one of the cells
in the current worksheet. Does anyone have a clue how to do this?
Any help is appreciated.



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
Create folders from list vb/macro? Sherri Excel Discussion (Misc queries) 2 May 13th 09 07:40 PM
Saving shared spreadsheets on a shared drive. Meridith Excel Discussion (Misc queries) 0 April 3rd 08 05:20 PM
shared spreadsheet on a shared drive Meridith Excel Discussion (Misc queries) 0 January 23rd 08 02:16 AM
Printing viewing a shared workbook on a shared drive aloomba Excel Discussion (Misc queries) 0 April 13th 07 02:52 PM
Drive - Folders - Files DPC Excel Discussion (Misc queries) 1 May 26th 05 08:39 PM


All times are GMT +1. The time now is 11:36 PM.

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

About Us

"It's about Microsoft Excel"