ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Question Using SaveAs Method (https://www.excelbanter.com/excel-programming/282341-question-using-saveas-method.html)

R3df1sh

Question Using SaveAs Method
 

I am trying to accomplish a saveas routine for a workbook that whe
clicked as a button, it will compose the filename from combining th
values of multiple fields (Cells A1 + A2 + A3 & ".Xls")and save to
designated area as a new copy. Could anyone help me with the coding fo
this? I am relatively new to Excel XP VB Useage and have picked up th
basic functions, but fall short in this area.

Much Thanks to those that can hel

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com


Chip Pearson

Question Using SaveAs Method
 
Try something like

Dim FName As String
FName = Range("A1").Value & Range("A2").Value & _
Range("A3").Value & ".xls"
ThisWorkbook.SaveAs Filename:=FName

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"R3df1sh" wrote in message
...

I am trying to accomplish a saveas routine for a workbook that when
clicked as a button, it will compose the filename from combining the
values of multiple fields (Cells A1 + A2 + A3 & ".Xls")and save to a
designated area as a new copy. Could anyone help me with the coding for
this? I am relatively new to Excel XP VB Useage and have picked up the
basic functions, but fall short in this area.

Much Thanks to those that can help


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/





All times are GMT +1. The time now is 07:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com