Material file path setting is empty

The following code returns an empty string instead of the path of the material database.

What am I doing wrong?

Dim matLibPath As String

matLibPath = Part.GetUserPreferenceStringValue(swUserPreferenceStringValue_e.swFileLocationsMaterialDatabases)

SolidworksApi/macros