Re: $$Excel-Macros$$ detecting loggedin user

2012-09-11 Thread Midhun Thampan
Hi All;

Thanks a lot.

Paul Thanks for ur help to guide me through properly.
I can now go forward with this one..
Thanks Again;
regards Midhun

On Tue, Sep 11, 2012 at 7:29 AM, Asa Rossoff a...@lovetour.info wrote:
 Hi Midhun,



 I like Paul's thorough response.



 I thought I'd mention that there is a simpler / easier-to-remember way of
 detecting the logged-in user's name from a macro:

 Function ReturnUserName() As String

 UserName = Environ(USERNAME)

 End Function



 It is slightly less secure, since the environment variable could be fairly
 easily modified by a knowledgeable user (in other words Paul's method is
 actually preferable).  But no security you implement in Excel will be high
 security anyway.



 If the data you are hiding is of an actual confidential nature, I would
 recommend instead using a macro to generate a copy of the spreadsheet that
 only contains the data for a single user, and sending that to the end-user.



 Asa





 From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
 On Behalf Of Paul Schreiner
 Sent: Monday, September 10, 2012 12:06 PM
 To: excel-macros@googlegroups.com
 Subject: Re: $$Excel-Macros$$ detecting loggedin user



 Here's something I threw together from macros I already had.

 I didn't spend too much time on it.

 I hope they have what you're looking for.



 There are several things you MENTIONED that I tried to include.

 Since you want the user to view ONLY his performance,

 I added filters to the YTD Output sheet and protected it with a password
 testpassword.

 (you can change it to whatever you wish)

 The file should be saved with only blank rows displayed and password
 protected.

 You'll also want to password protect  your VBA project so that the users
 won't be able to

 open the VBEditor and read the sheet password.



 When the user opens the file, it determines the user's ID based on his/her
 Windows login.

 It then updates the Userid in the YTD Performance sheet.



 A change Event on this sheet checks for a changed userid and calls a
 function

 that unprotects the Output sheet, changes the filter to include only the
 userid,

 then re-protects the sheet.



 hope this gives you enough to work with to complete your task.


 Paul

 -
 “Do all the good you can,
 By all the means you can,
 In all the ways you can,
 In all the places you can,
 At all the times you can,
 To all the people you can,
 As long as ever you can.” - John Wesley
 -





 

 From: Midhun Thampan midhun.tham...@gmail.com
 To: excel-macros@googlegroups.com
 Sent: Mon, September 10, 2012 1:04:27 PM
 Subject: $$Excel-Macros$$ detecting loggedin user

 Hi All;

 This is a excel file which has a database which will be locked.

 Just need a code tht will detect only the information of user who logs
 on the computer.
 Our system is logged in via 5 digit userid so as someone opens this
 file his userid should detected so tht he can only view his particular
 performance..

 Kindly help, i tried but did not work.


 --
 Midhun

 --
 Join official facebook page of this forum @
 https://www.facebook.com/discussexcel

 FORUM RULES (1120+ members already BANNED for violation)

 1) Use concise, accurate thread titles. Poor thread titles, like Please
 Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will
 not get quick attention or may not be answered.

 2) Don't post a question in the thread of another member.

 3) Don't post questions regarding breaking or bypassing any security
 measure.

 4) Acknowledge the responses you receive, good or bad.

 5)  Cross-promotion of, or links to, forums competitive to this forum in
 signatures are prohibited.

 6) Jobs posting is not allowed.

 7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.

 NOTE  : Don't ever post personal or confidential data in a workbook. Forum
 owners and members are not responsible for any loss.
 ---
 You received this message because you are subscribed to the Google Groups
 MS EXCEL AND VBA MACROS group.
 To post to this group, send email to excel-macros@googlegroups.com.
 To unsubscribe from this group, send email to
 excel-macros+unsubscr...@googlegroups.com.

 --
 Join official facebook page of this forum @
 https://www.facebook.com/discussexcel

 FORUM RULES (1120+ members already BANNED for violation)

 1) Use concise, accurate thread titles. Poor thread titles, like Please
 Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will
 not get quick attention or may not be answered.

 2) Don't post a question in the thread of another member.

 3) Don't post questions regarding breaking or bypassing any security
 measure.

 4) Acknowledge the responses you receive, good or bad.

 5) Cross-promotion of, or links to, forums competitive to this forum in
 signatures are prohibited.

 6) Jobs posting is not allowed.

 7

Re: $$Excel-Macros$$ detecting loggedin user

2012-09-10 Thread Kuldeep Singh
Hi,

You can try this.

=INDEX('YTD Output'!$F$2:$F$228,MATCH('YTD Performance'!C8,'YTD
Output'!$C$2:$C$228,0))
=INDEX('YTD Output'!$H$2:$H$228,MATCH('YTD Performance'!C9,'YTD
Output'!$F$2:$F$228,0))

Regards,
Kuldeep Singh

On Mon, Sep 10, 2012 at 10:34 PM, Midhun Thampan
midhun.tham...@gmail.comwrote:

 Hi All;

 This is a excel file which has a database which will be locked.

 Just need a code tht will detect only the information of user who logs
 on the computer.
 Our system is logged in via 5 digit userid so as someone opens this
 file his userid should detected so tht he can only view his particular
 performance..

 Kindly help, i tried but did not work.


 --
 Midhun

 --
 Join official facebook page of this forum @
 https://www.facebook.com/discussexcel

 FORUM RULES (1120+ members already BANNED for violation)

 1) Use concise, accurate thread titles. Poor thread titles, like Please
 Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
 will not get quick attention or may not be answered.

 2) Don't post a question in the thread of another member.

 3) Don't post questions regarding breaking or bypassing any security
 measure.

 4) Acknowledge the responses you receive, good or bad.

 5)  Cross-promotion of, or links to, forums competitive to this forum in
 signatures are prohibited.

 6) Jobs posting is not allowed.

 7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.

 NOTE  : Don't ever post personal or confidential data in a workbook. Forum
 owners and members are not responsible for any loss.
 ---
 You received this message because you are subscribed to the Google Groups
 MS EXCEL AND VBA MACROS group.
 To post to this group, send email to excel-macros@googlegroups.com.
 To unsubscribe from this group, send email to
 excel-macros+unsubscr...@googlegroups.com.

-- 
Join official facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES (1120+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

6) Jobs posting is not allowed.

7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups MS 
EXCEL AND VBA MACROS group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.




Re: $$Excel-Macros$$ detecting loggedin user

2012-09-10 Thread Paul Schreiner
Here's something I threw together from macros I already had.
I didn't spend too much time on it.
I hope they have what you're looking for.

There are several things you MENTIONED that I tried to include.
Since you want the user to view ONLY his performance, 
I added filters to the YTD Output sheet and protected it with a password 
testpassword.
(you can change it to whatever you wish)
The file should be saved with only blank rows displayed and password protected.
You'll also want to password protect  your VBA project so that the users won't 
be able to 

open the VBEditor and read the sheet password.

When the user opens the file, it determines the user's ID based on his/her 
Windows login.
It then updates the Userid in the YTD Performance sheet.

A change Event on this sheet checks for a changed userid and calls a function
that unprotects the Output sheet, changes the filter to include only the userid,
then re-protects the sheet.

hope this gives you enough to work with to complete your task.
 
Paul
-
“Do all the good you can,
By all the means you can,
In all the ways you can,
In all the places you can,
At all the times you can,
To all the people you can,
As long as ever you can.” - John Wesley
-





From: Midhun Thampan midhun.tham...@gmail.com
To: excel-macros@googlegroups.com
Sent: Mon, September 10, 2012 1:04:27 PM
Subject: $$Excel-Macros$$ detecting loggedin user

Hi All;

This is a excel file which has a database which will be locked.

Just need a code tht will detect only the information of user who logs
on the computer.
Our system is logged in via 5 digit userid so as someone opens this
file his userid should detected so tht he can only view his particular
performance..

Kindly help, i tried but did not work.


-- 
Midhun

-- 
Join official facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES (1120+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 


6) Jobs posting is not allowed.

7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups MS 
EXCEL AND VBA MACROS group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.

-- 
Join official facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES (1120+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

6) Jobs posting is not allowed.

7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups MS 
EXCEL AND VBA MACROS group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.




OUTPUT.xlsb
Description: application/vnd.ms-excel.sheet.binary.macroenabled.12


RE: $$Excel-Macros$$ detecting loggedin user

2012-09-10 Thread Asa Rossoff
Hi Midhun,

 

I like Paul's thorough response.

 

I thought I'd mention that there is a simpler / easier-to-remember way of
detecting the logged-in user's name from a macro:

Function ReturnUserName() As String

UserName = Environ(USERNAME)

End Function

 

It is slightly less secure, since the environment variable could be fairly
easily modified by a knowledgeable user (in other words Paul's method is
actually preferable).  But no security you implement in Excel will be high
security anyway.

 

If the data you are hiding is of an actual confidential nature, I would
recommend instead using a macro to generate a copy of the spreadsheet that
only contains the data for a single user, and sending that to the end-user.

 

Asa

 

 

From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of Paul Schreiner
Sent: Monday, September 10, 2012 12:06 PM
To: excel-macros@googlegroups.com
Subject: Re: $$Excel-Macros$$ detecting loggedin user

 

Here's something I threw together from macros I already had.

I didn't spend too much time on it.

I hope they have what you're looking for.

 

There are several things you MENTIONED that I tried to include.

Since you want the user to view ONLY his performance, 

I added filters to the YTD Output sheet and protected it with a password
testpassword.

(you can change it to whatever you wish)

The file should be saved with only blank rows displayed and password
protected.

You'll also want to password protect  your VBA project so that the users
won't be able to 

open the VBEditor and read the sheet password.

 

When the user opens the file, it determines the user's ID based on his/her
Windows login.

It then updates the Userid in the YTD Performance sheet.

 

A change Event on this sheet checks for a changed userid and calls a
function

that unprotects the Output sheet, changes the filter to include only the
userid,

then re-protects the sheet.

 

hope this gives you enough to work with to complete your task.
 

Paul

-
Do all the good you can,
By all the means you can,
In all the ways you can,
In all the places you can,
At all the times you can,
To all the people you can,
As long as ever you can. - John Wesley
-

 

 

  _  

From: Midhun Thampan midhun.tham...@gmail.com
To: excel-macros@googlegroups.com
Sent: Mon, September 10, 2012 1:04:27 PM
Subject: $$Excel-Macros$$ detecting loggedin user

Hi All;

This is a excel file which has a database which will be locked.

Just need a code tht will detect only the information of user who logs
on the computer.
Our system is logged in via 5 digit userid so as someone opens this
file his userid should detected so tht he can only view his particular
performance..

Kindly help, i tried but did not work.


-- 
Midhun

-- 
Join official facebook page of this forum @
https://www.facebook.com/discussexcel

FORUM RULES (1120+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please
Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will
not get quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security
measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in
signatures are prohibited. 

6) Jobs posting is not allowed.

7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.

NOTE  : Don't ever post personal or confidential data in a workbook. Forum
owners and members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups
MS EXCEL AND VBA MACROS group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to
excel-macros+unsubscr...@googlegroups.com.



-- 
Join official facebook page of this forum @
https://www.facebook.com/discussexcel
 
FORUM RULES (1120+ members already BANNED for violation)
 
1) Use concise, accurate thread titles. Poor thread titles, like Please
Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will
not get quick attention or may not be answered.
 
2) Don't post a question in the thread of another member.
 
3) Don't post questions regarding breaking or bypassing any security
measure.
 
4) Acknowledge the responses you receive, good or bad.
 
5) Cross-promotion of, or links to, forums competitive to this forum in
signatures are prohibited. 
 
6) Jobs posting is not allowed.
 
7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.
 
NOTE : Don't ever post personal or confidential data in a workbook. Forum
owners and members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups
MS EXCEL AND VBA MACROS group