![]() |
extracting a stringvalue from filename
hello, I have a problem, actually two. First: I have a filename e.g. testing-123.xls I want to extract the filename as a string and than place this value in a cell in the same worksheet. Second: I want to save a certain workbook with the date of today. E.G. Testing-(today date).xls How can i program this in vba Regards, Niek ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
extracting a stringvalue from filename
Niek,
Get filename - in the immediate window ?replace("filename.xls",".xls","") save file Activeworkbook.SaveAs Filename:="Testing-" & Format(Date,"dd mmm yyyy") & ".xls" -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "solo_razor" wrote in message ... hello, I have a problem, actually two. First: I have a filename e.g. testing-123.xls I want to extract the filename as a string and than place this value in a cell in the same worksheet. Second: I want to save a certain workbook with the date of today. E.G. Testing-(today date).xls How can i program this in vba Regards, Niek ------------------------------------------------ ~~ 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:35 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com