Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Macro that opens an xls file then saves it with another name

I just want to be able to call an existing excel file, junk.xls, then
save it as notjunk.xls. Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Macro that opens an xls file then saves it with another name

No need to open to rename. Look in the vba help index for NAME

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Captain Snuggles" wrote in message
...
I just want to be able to call an existing excel file, junk.xls, then
save it as notjunk.xls. Any ideas?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Macro that opens an xls file then saves it with another name

I think this will work.

Sub Vert()
myPath = ThisWorkbook.Path
Set wb = Workbooks.Open Filename:=myPath & "\junk.xls"
wb.SaveAs filename:="notjunk.xls"
End Sub

"Captain Snuggles" wrote:

I just want to be able to call an existing excel file, junk.xls, then
save it as notjunk.xls. Any ideas?

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
File opens another file runs macro and closes Steven Excel Programming 2 July 3rd 08 04:45 AM
building a macro that saves a file and converts to pdf Brian Excel Programming 3 October 26th 06 11:08 PM
Macro that saves Excel worksheet with value in C4 as the file name Benedikt F Excel Programming 2 October 2nd 06 04:09 AM
Recorded macro opens, converts comma-del file and saves Ed Excel Programming 6 September 22nd 06 08:36 PM
button that opens open dialogs but saves path to sheet cereldine[_22_] Excel Programming 7 April 28th 06 12:08 PM


All times are GMT +1. The time now is 03:47 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"