Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 788
Default Adding Username and Password facility

Hi,

I'm not sure if this is possible, but what I want to do is add a username
and password facility to an excel spreadsheet. When the user has logged in,
if they decide to print the sheet, on the header (or footer), it should have
the name of the person who logged in.

The purpose is to find out who printed what sheets, and if the sheets are
given out or left on desks, it is possible to see where they came from, so if
anybody knows a different way, please let me know!

Cheers!
Chris
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Adding Username and Password facility

Chris,
One solution:
http://blogs.officezealot.com/charle...2/10/3574.aspx

Setting a password is another issue. Check the .Protect method in the VBA
help.

NickHK

"Chris" wrote in message
...
Hi,

I'm not sure if this is possible, but what I want to do is add a username
and password facility to an excel spreadsheet. When the user has logged

in,
if they decide to print the sheet, on the header (or footer), it should

have
the name of the person who logged in.

The purpose is to find out who printed what sheets, and if the sheets are
given out or left on desks, it is possible to see where they came from, so

if
anybody knows a different way, please let me know!

Cheers!
Chris



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Adding Username and Password facility

To print the username all you need is

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftHeader = Environ("UserName")
End With
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--
HTH

Bob Phillips

"Chris" wrote in message
...
Hi,

I'm not sure if this is possible, but what I want to do is add a username
and password facility to an excel spreadsheet. When the user has logged

in,
if they decide to print the sheet, on the header (or footer), it should

have
the name of the person who logged in.

The purpose is to find out who printed what sheets, and if the sheets are
given out or left on desks, it is possible to see where they came from, so

if
anybody knows a different way, please let me know!

Cheers!
Chris



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get a adcenter username and password Chops Excel Discussion (Misc queries) 0 November 11th 08 11:31 PM
XMLHTTP.OPEN + PASSWORD + USERNAME venk Excel Programming 0 March 17th 05 10:27 PM
Web Query: Username and Password. Sharad Naik Excel Programming 0 December 16th 04 09:43 AM
username & password check Jack Excel Programming 5 October 8th 04 03:20 PM
creating a username and password box kil Excel Programming 1 May 20th 04 08:20 AM


All times are GMT +1. The time now is 03:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"