RE:recoger nombre de usuario activo
'LAS SIGUIENTES LINEAS DE CODIGO SE UTILIZAN PARA CONSEGUIR EL USUARIO QUE HA INICIADO SESION
Dim strTemp As String, strUserName As String
'Create a buffer
strTemp = String(100, Chr$(0))
'Get the temporary path
GetTempPath 100, strTemp
'strip the rest of the buffer
strTemp = Left$(strTemp, InStr(strTemp, Chr$(0)) - 1)
'Create a buffer
strUserName = String(100, Chr$(0))
'Get the username
GetUserName strUserName, 100
'strip the rest of the buffer
strUserName = Left$(strUserName, InStr(strUserName, Chr$(0)) - 1)
'Show the temppath and the username
'MsgBox "Hello " + strUserName + Chr$(13) + "The temp. path is " + strTemp