UDF doesn't work on a protected sheet in Excel 2003

C

CarpeDiem

How Can I make this function to work on a protected sheet (Excel version: 2003)

The Code:

Function LSUser()
LSUser = Environ("username")

End Function

Much appreciated if I could get the answer for this issue :). The function
works fine on a protected sheet in Excel:2007, In Excel: 2003 it doesn't
changes the name if a new user updates the worksheet. All the cells in the
worksheet are write protected except for some on which the user enters the
information and then saves it. The worksheet was designed and created in
excel 2003.
 
G

Gary''s Student

Perhaps Volitility just is not there. In A1, enter:

=NOW()

Modify your UDF:

Function LSUser(r As Range)
LSUser = Environ("username")
End Function

and in a worksheet cell:

=LSUser(A1)

The point is that A1 should ALWAYS re-calculate, and therefore, the cell
containing the UDF should always re-calculate
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top