LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Creating a folder using macro...

s$ = "C:\LOA\" & strProjectNumber
On Error Resume Next
mkdir "C:\LOA\" & strProjectNumber
On Error goto 0
bk.SaveAs FileName:= s$ & "\" & fnames$

should do what you want.

--
Regards,
Tom Ogilvy



"ChrisMattock" wrote:


Thanks, but if the directory exists I just want the files saved in it
rather than it quitting out, and I still don't know how to modify the
path when saving the file to reflect the directory name. I did warn you
I was an idiot. :P


--
ChrisMattock
------------------------------------------------------------------------
ChrisMattock's Profile: http://www.excelforum.com/member.php...o&userid=33912
View this thread: http://www.excelforum.com/showthread...hreadid=545527


 
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
Macro creating folder and files automatically, without permission. pokdbz Excel Discussion (Misc queries) 1 November 8th 07 04:24 PM
Creating a new folder cereldine[_33_] Excel Programming 2 May 12th 06 11:48 AM
Creating Folder Folder in My Documents VBA - HELP Ali[_4_] Excel Programming 3 July 25th 05 02:17 PM
Macro for creating folder RG[_2_] Excel Programming 1 December 29th 03 06:53 PM
creating folder Lawson Excel Programming 1 December 3rd 03 01:16 AM


All times are GMT +1. The time now is 01:03 PM.

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

About Us

"It's about Microsoft Excel"