Function fnUsuario(Optional strTipo As String = "OS") As String
Select Case UCase(strTipo)
Case "EXCEL"
fnUsuario = Application.UserName
Case "OS"
fnUsuario = Environ("Username")
Case Else
fnUsuario = "Fidel Castro (no conozco """ & strTipo & """, ponga EXCEL u OS [o nada])"
End Select
End Function