You would need two functions - one for the getter, and one for the setter.
So why not make it a property?
Private lPathToTop As String
Public Property PathToTop() As String
Get
Return lPathToTop
End Get
Set
lPathToTop = value
lAttribute = lDatabase.GetProperties(lPathToTop)
End Set
End Property