View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
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