Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default MkDir and Save As

If I use the MkDir command to make a new folder then use the save as command
to save an open file under a different name,
how do I change the save as code to direct the new file to save in the new
folder?


Dan

' Variable FolderNme
' Variable FstNme
' Variable LstNme

FolderNme = "C:\Documents and Settings\All Users\" & _
"Documents\OFFICE SKILLS\" & (FstNme & " " & LstNme)
On Error Resume Next
MkDir FolderNme
On Error GoTo 0

Workbooks.Open Filename:= _
"C:\Documents and Settings\All Users\Documents\" & _
"OFFICE SKILLS\Invoice_AND_Total_Sheet.xls"

' Workbooks("Invoice_AND_Total_Sheet.xls").SaveAs _
' "C:\Documents and Settings\All Users\" & _
' "Documents\OFFICE SKILLS\" & _ (FolderNme) & _
' "Invoice_AND_Total_Sheet.xls"
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default MkDir and Save As

Workbooks.Open Filename:= _
"C:\Documents and Settings\All Users\Documents\" & _
"OFFICE SKILLS\Invoice_AND_Total_Sheet.xls"

Workbooks("Invoice_AND_Total_Sheet.xls").SaveAs _
FolderNme & _
"\" & "Invoice_AND_Total_Sheet.xls"

--
Regards,
Tom Ogilvy

"wtpcomplab" wrote in message
...
If I use the MkDir command to make a new folder then use the save as

command
to save an open file under a different name,
how do I change the save as code to direct the new file to save in the new
folder?


Dan

' Variable FolderNme
' Variable FstNme
' Variable LstNme

FolderNme = "C:\Documents and Settings\All Users\" & _
"Documents\OFFICE SKILLS\" & (FstNme & " " & LstNme)
On Error Resume Next
MkDir FolderNme
On Error GoTo 0

Workbooks.Open Filename:= _
"C:\Documents and Settings\All Users\Documents\" & _
"OFFICE SKILLS\Invoice_AND_Total_Sheet.xls"

' Workbooks("Invoice_AND_Total_Sheet.xls").SaveAs _
' "C:\Documents and Settings\All Users\" & _
' "Documents\OFFICE SKILLS\" & _ (FolderNme) & _
' "Invoice_AND_Total_Sheet.xls"



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default MkDir and Save As


Thank's :)


"Tom Ogilvy" wrote:

Workbooks.Open Filename:= _
"C:\Documents and Settings\All Users\Documents\" & _
"OFFICE SKILLS\Invoice_AND_Total_Sheet.xls"

Workbooks("Invoice_AND_Total_Sheet.xls").SaveAs _
FolderNme & _
"\" & "Invoice_AND_Total_Sheet.xls"

--
Regards,
Tom Ogilvy

"wtpcomplab" wrote in message
...
If I use the MkDir command to make a new folder then use the save as

command
to save an open file under a different name,
how do I change the save as code to direct the new file to save in the new
folder?


Dan

' Variable FolderNme
' Variable FstNme
' Variable LstNme

FolderNme = "C:\Documents and Settings\All Users\" & _
"Documents\OFFICE SKILLS\" & (FstNme & " " & LstNme)
On Error Resume Next
MkDir FolderNme
On Error GoTo 0

Workbooks.Open Filename:= _
"C:\Documents and Settings\All Users\Documents\" & _
"OFFICE SKILLS\Invoice_AND_Total_Sheet.xls"

' Workbooks("Invoice_AND_Total_Sheet.xls").SaveAs _
' "C:\Documents and Settings\All Users\" & _
' "Documents\OFFICE SKILLS\" & _ (FolderNme) & _
' "Invoice_AND_Total_Sheet.xls"




Reply
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
mkdir command in excel 2003 on XP SP2 zvi carmi via OfficeKB.com New Users to Excel 2 May 25th 05 12:45 PM
mkdir problem Tom Ogilvy Excel Programming 2 August 31st 04 03:22 PM
mkdir problem Norman Jones Excel Programming 0 August 30th 04 04:37 PM
Shell "mkdir" Robin Clay[_3_] Excel Programming 2 August 4th 04 04:30 PM
MkDir error Eric Excel Programming 3 May 17th 04 08:58 PM


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

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

About Us

"It's about Microsoft Excel"