Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro that will take data from an existing spreadsheet and copy
certain sheets into a new workbook. It then pastes these sheets as values. What I want to do is save this new workbook and base the file name on the original workbook and then add the text "(Values)" after it. So something in C:\My Documents\Review For Partner.xls would then become C:\My Documents\Review For Partner (Values).xls A sample of the code is shown below: Sub Macro1() NewBookName = ThisWorkbook.FullName & " (Values)" End Sub The problem is that the file is called C:\My Documents\Review For Partner.xls (Values).xls I can see this is because when I use ThisWorkbook.FullName it produces the answer "C:\My Documents\Review For Partner.xls" What can I do to remove this .xls? Thanks in advance. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
changing the filename in a Link | Excel Discussion (Misc queries) | |||
link to other workbook with changing filename | Excel Worksheet Functions | |||
Changing Filename when linked to other worksheets | Excel Discussion (Misc queries) | |||
Dynamically changing filename referenced by day | Excel Programming | |||
hyperlinks-changing the filename only! | Excel Programming |