LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default creating new folder while saving document

I am trying to create a command, that when clicked will print out a boo
twice and save it. It needs to create a new folder in the directory.
The Name of the folder, needs to be what is in Text Box 1. This i
what I currently have. Can someone point me in the right direction?


Private Sub CommandButton1_Click()
Unload Me
ActiveWorkbook.PrintOut
ChDir "\\Pkcfp009\Mait_e&d\NewHireDocumentation\La
Forms\Transition to Success\"
Dim NameOFile$
NameOFile = TextBox2.Text
ThisWorkbook.SaveAs NameOFile & ".xls"
ChDir "%USERPROFILE%\Transition to Success Plans\"
Dim NameOFile$
NameOFile = TextBox2.Text
ThisWorkbook.SaveAs NameOFile & ".xls"
End Su

--
Message posted from http://www.ExcelForum.com

 
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
Saving a workbook by creating a folder & subfolder Gaura215 Excel Worksheet Functions 0 February 1st 11 10:47 AM
document information from folder Joe Excel Discussion (Misc queries) 0 March 15th 10 06:33 PM
Templates - saving in specified folder Kathrine Excel Discussion (Misc queries) 4 October 30th 08 04:02 PM
Saving file to a specific folder richkim2000 Excel Discussion (Misc queries) 1 January 25th 05 11:11 PM
Specify a folder for saving to?!?! solo_razor[_12_] Excel Programming 1 October 28th 03 10:14 AM


All times are GMT +1. The time now is 09:38 AM.

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"