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

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

frotaru

Board Regular
Joined
Oct 12, 2006
Messages
124
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
 

schafers

Board Regular
Joined
Jul 5, 2005
Messages
74
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!!
 

Forum statistics

Threads
1,141,718
Messages
5,708,072
Members
421,543
Latest member
SGM

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
Top