ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Network logon (https://www.excelbanter.com/excel-programming/437654-network-logon.html)

JP Ronse

Network logon
 
Hi,

Some time ago, someone replied with a method to get the network logon and
used createobject. It has the same functionality as

Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" _
(ByVal lpBuffer As String, nSize As Long) As Long

Can someone refresh my mind. TIA.

With kind regards,

JP



joel[_369_]

Network logon
 

You are a little bit vague. I did a google search for the following and
got lots of different answers

VBA GetUserName advapi32.dll createobject


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=164049

Microsoft Office Help


JP Ronse

Network logon
 
Hi Joel,

I used the API before to show 1 sheet in a workbook to a specific network
logon. Someone showed overhere another method to do the same.

With kind regards,

JP

"joel" wrote in message
...

You are a little bit vague. I did a google search for the following and
got lots of different answers

VBA GetUserName advapi32.dll createobject


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=164049

Microsoft Office Help




joel[_370_]

Network logon
 

You don't need to use createobject you can use environ() method

UserName = environ("UserName")


I'm not sure what other login username you are using that requires a
createobject. Are you using an Internet Explorer and then login?


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=164049

Microsoft Office Help


Barb Reinhardt

Network logon
 
I recently tried the environ method and it didn't work for some users. I had
to replace it with the following.

http://www.mvps.org/access/api/api0008.htm
--
HTH,

Barb Reinhardt



"joel" wrote:


You don't need to use createobject you can use environ() method

UserName = environ("UserName")


I'm not sure what other login username you are using that requires a
createobject. Are you using an Internet Explorer and then login?


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=164049

Microsoft Office Help

.


joel[_372_]

Network logon
 

Some environmental parameters can bne different on different PCs. to
check the envirnonmental parameters go to a dos window and type SET.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=164049

Microsoft Office Help



All times are GMT +1. The time now is 10:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com