Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using VBA in Excel to Make a Folder to Save Workbooks in
Hi ,
I have a cell(1,1) that has the text "Sept" in it and cell(1,2) has "03" in it. Is there a way to make a folder in C:\My documents\Invoices, that would name the folder "Sept-03" ? (I would like to make a macro that I run once a month that would make this new folder naming it the month and year so I could save invoices made out to different companies to it) Thanks in advance for any help offered. Jeff Marshall x23 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using VBA in Excel to Make a Folder to Save Workbooks in
Try
ChDir "C:\My documents\Invoices" MkDir Format(Now, "mmm-yy") -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "Jeff Marshall" wrote in message ... Hi , I have a cell(1,1) that has the text "Sept" in it and cell(1,2) has "03" in it. Is there a way to make a folder in C:\My documents\Invoices, that would name the folder "Sept-03" ? (I would like to make a macro that I run once a month that would make this new folder naming it the month and year so I could save invoices made out to different companies to it) Thanks in advance for any help offered. Jeff Marshall x23 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using VBA in Excel to Make a Folder to Save Workbooks in
Hi
Or this Private Sub CommandButton1_Click() On Error GoTo waserror ChDrive "C" ChDir "C:\" ChDir "C:\my documents\invoices\" MkDir Cells(1, "a") & " - " & Cells(1, "b") Exit Sub waserror: MsgBox ("Folder may already exist. Please check") End Sub HTH Ken "Jeff Marshall" wrote in message ... Hi , I have a cell(1,1) that has the text "Sept" in it and cell(1,2) has "03" in it. Is there a way to make a folder in C:\My documents\Invoices, that would name the folder "Sept-03" ? (I would like to make a macro that I run once a month that would make this new folder naming it the month and year so I could save invoices made out to different companies to it) Thanks in advance for any help offered. Jeff Marshall x23 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy folder with excel linked workbooks | Excel Discussion (Misc queries) | |||
excel says folder is read only and cannot save | Setting up and Configuration of Excel | |||
Need code to save file to new folder, erase from old folder | Excel Discussion (Misc queries) | |||
"Save As" folder -- can I default this to the same folder as origi | Excel Discussion (Misc queries) | |||
How do I save an excel folder to disk? | New Users to Excel |