Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Changing workbook name in macro


I want to change (in a macro) a workbook name before saving. Fo
instance: the original file is opened as "test.xls", an InputBox ask
for the extension (he _abc) and on saving the name should b
"test_abc.xls". I don't want the original file to be overwritten. Ho
can I achieve this

--
Dutch7
-----------------------------------------------------------------------
Dutch76's Profile: http://www.hightechtalks.com/m82
View this thread: http://www.hightechtalks.com/t234349

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Changing workbook name in macro

With Activeworkbook
.saveas filename:= left(.name,len(.name)-4) & ib_value & ".xls"
End With

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Dutch76" wrote in message
...

I want to change (in a macro) a workbook name before saving. For
instance: the original file is opened as "test.xls", an InputBox asks
for the extension (he _abc) and on saving the name should be
"test_abc.xls". I don't want the original file to be overwritten. How
can I achieve this?


--
Dutch76
------------------------------------------------------------------------
Dutch76's Profile: http://www.hightechtalks.com/m829
View this thread: http://www.hightechtalks.com/t2343497



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
Refresh pivot table in workbook A when changing a cell in workbook gildengorin Excel Worksheet Functions 2 March 17th 09 04:59 PM
changing 08 workbook to 09 Marjean Excel Discussion (Misc queries) 2 February 26th 09 09:10 PM
Saving a sheet in a workbook as .csv but not changing workbook name gloryofbach[_4_] Excel Programming 3 October 30th 05 08:50 PM
Running a macro to protect a workbook on a already protected workbook UNprotects the workbook ?? WimR Excel Programming 9 July 25th 05 12:44 PM
changing name of workbook inquirer Excel Programming 2 January 13th 05 05:30 AM


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