Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi please help me out on this...
Everytime i save the file, the file name should be changed to test1.xls; second time i open & save the file, the name changes to Test2.xls & so on.... |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Put a _ before the number, like Test_2, and then use
With ActiveWorkbook iPos = InStr(.Name, "_") iFile = Mid(.Name, iPos + 1, InStr(.Name, ".") - iPos - 1) .SaveAs Left(.Name, iPos) & (iFile + 1) & ".xls" End With -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "Arjun Dutta" wrote in message ... Hi please help me out on this... Everytime i save the file, the file name should be changed to test1.xls; second time i open & save the file, the name changes to Test2.xls & so on.... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Renaming a file while maintaining links | Excel Worksheet Functions | |||
VB file renaming. | Excel Worksheet Functions | |||
Renaming A File | Excel Discussion (Misc queries) | |||
Copying and renaming a file | Excel Discussion (Misc queries) | |||
Renaming a file | Excel Programming |