Mkdir – path&name from worksheet

frotaru

Board Regular
Joined
Oct 12, 2006
Messages
124
Hello

I want to know if it is possible that a macro can automatically create a folder in a specified location.

For example

Windows("test001.xls").Activate
Sheets("sheet1").Select
Range("A1").Select
ActiveCell.FormulaR1C1 = "c:\test\folderhere"


If I want to create a folder in c:\test with name Folderhere
How can I use Mkdir for range(“A1”)

range(“A1”) will always contain location and name of folder


Than you all
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Hi

Yes it worked :) How simple it was

One more question - how can i put an if Close here

For example the folder name that it will create is "17.10"

If 17.10 exist than make it 18.10
if 18.10 exist than 19.10 and so on ...

something like if xx.10 exist .. than create xx+1.10

Than you
 
Upvote 0
Attributes on the Directory?

After adding in the directory, is it possible to change the attributes of that directory? So that the directory is hidden?

I'm trying to make a directory that is a data tab to the file the user has, so I can send updates to this directory without them hosing up the files or directory inside it, as they are just data.

Thanks to the Gurus!!
 
Upvote 0

Forum statistics

Threads
1,214,925
Messages
6,122,303
Members
449,078
Latest member
nonnakkong

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top