I need a code in EXcel VB for
1.To create a new folder
2.Insert an Excel file from other source in this folder
3.The format of excel name should be in week_date_name.xls
Pl. help me out
![]() | It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!) |

|
|
|
|
Moderator: dafunkymunky
Dim foldername As String
Dim source As String, dest As String
Dim curfolder As String, newfolder As String
foldername = Name of you folder here
curfolder = "C:\" 'This is where you want to save your folder
newfolder = curfolder & "\" & foldername
MkDir (newfolder)
source = curfolder & "\" & "source.xls" 'write here the name of the file you want to insert to your folder
dest = newfolder & "\" & "week_date_name.xls"
FileCopy source, dest

Users browsing this forum: No registered users and 5 guests