![]() |
Filename Function
Function FName()
FName = ActiveWorkbook.Name End Function This returns the filename.xls. Can I add a left function to this to remove the .xls? I can do it within a cell, but not sure how to edit the function to do it. Thanks! |
Filename Function
Hi Steph,
Dim fname As String fname = ActiveWorkbook.Name fname = Left(fname, Len(fname) - 4) MsgBox fname --- Regards, Norman "Steph" wrote in message ... Function FName() FName = ActiveWorkbook.Name End Function This returns the filename.xls. Can I add a left function to this to remove the .xls? I can do it within a cell, but not sure how to edit the function to do it. Thanks! |
Filename Function
Thank you!
"Norman Jones" wrote in message ... Hi Steph, Dim fname As String fname = ActiveWorkbook.Name fname = Left(fname, Len(fname) - 4) MsgBox fname --- Regards, Norman "Steph" wrote in message ... Function FName() FName = ActiveWorkbook.Name End Function This returns the filename.xls. Can I add a left function to this to remove the .xls? I can do it within a cell, but not sure how to edit the function to do it. Thanks! |
All times are GMT +1. The time now is 09:03 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com