Hello,
I am using some functions in excel to show the workbookname, username, company and sheetname in my spreadsheets.
I have used the following statements:
Function workbookname() As String
'returns the workbook name of the cell
workbookname = Application.Caller.Parent.Parent.Name
End Function
Function SHEETNAME() As String
' Returns the sheet name for string
SHEETNAME = Application.Caller.Parent.Name
End Function
Function USER()
' Returns the users name
USER = Application.UserName
'USER = UCase(USER)
End Function
Function COMPANY()
'returns the name of the company
COMPANY = Application.OrganizationName
End Function
These staments are located in module1 of my personalstartworkbook which opens automatically when I start excel.
My problem is that when the for example workbookname changes it does not automatically update the function workbookname(). I have to put the cursor on the cell en press F2 and return to update the value. Offcourse this is useless.
Anyone having a suggestion to solve this ?
Ronald de Vries
Bookmarks