M
mg
Hi , all
First of all i'm newbie to VBA Programming , and my english isn't
perfect too , but i hope someone can help me
I've written very simple function to get part of the spreadsheet name
Function FileNm(Optional Nbr As Integer = 4)
FileNm=WorksheetFunction.Substitute(ThisWorkbook.Name,Right(ThisWorkbook.Name,Nbr),"")
End Function
This function does not work properly , because when i close spreadsheet
, change it name , and then reopen , this function still returns the
same value . Any ideas how to solve this problem without writing
Workbook_Open() or Workbook_BeforeClose() events ?
First of all i'm newbie to VBA Programming , and my english isn't
perfect too , but i hope someone can help me
I've written very simple function to get part of the spreadsheet name
Function FileNm(Optional Nbr As Integer = 4)
FileNm=WorksheetFunction.Substitute(ThisWorkbook.Name,Right(ThisWorkbook.Name,Nbr),"")
End Function
This function does not work properly , because when i close spreadsheet
, change it name , and then reopen , this function still returns the
same value . Any ideas how to solve this problem without writing
Workbook_Open() or Workbook_BeforeClose() events ?