Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
EJ EJ is offline
external usenet poster
 
Posts: 20
Default Automatic Cell Population

I'm on a roll now...

How do I get cells to populate with the following on save?

Date
Time
Login name

This is probably easier to do than the last one!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default Automatic Cell Population

Date : =Date
Time: = Date mod 1
Login name: = Environ("username")

HTH
--
AP

"EJ" a écrit dans le message de news:
...
I'm on a roll now...

How do I get cells to populate with the following on save?

Date
Time
Login name

This is probably easier to do than the last one!




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Automatic Cell Population


Private Sub Workbook_BeforeClose(Cancel As Boolean)

[a1].Value = Now
[a2].Value = Environ("NWUSERNAME")

End Sub


Change a1 & b1 to whichever cells you want the info in.
Col


--
colofnature
------------------------------------------------------------------------
colofnature's Profile: http://www.excelforum.com/member.php...o&userid=34356
View this thread: http://www.excelforum.com/showthread...hreadid=544777

  #4   Report Post  
Posted to microsoft.public.excel.programming
ADG ADG is offline
external usenet poster
 
Posts: 76
Default Automatic Cell Population

try the below
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

Worksheets("SHEET5").Cells(2, 3) = Int(Now()) ' DATE TO C2
Worksheets("SHEET5").Cells(4, 3) = Now() - Int(Now()) ' Time to C3
Worksheets("SHEET5").Cells(5, 3) = Environ$("Username") ' Windows username
to C4

End Sub

Change sheet name and cell refs
--
Tony Green


"EJ" wrote:

I'm on a roll now...

How do I get cells to populate with the following on save?

Date
Time
Login name

This is probably easier to do than the last one!


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Automatic Cell Population

Environ("NWUSERNAME")

returns nothing for me - is that what you really intended?

--
Regards,
Tom Ogilvy


"colofnature" wrote:


Private Sub Workbook_BeforeClose(Cancel As Boolean)

[a1].Value = Now
[a2].Value = Environ("NWUSERNAME")

End Sub


Change a1 & b1 to whichever cells you want the info in.
Col


--
colofnature
------------------------------------------------------------------------
colofnature's Profile: http://www.excelforum.com/member.php...o&userid=34356
View this thread: http://www.excelforum.com/showthread...hreadid=544777




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Automatic Cell Population


Works for me - returns the ID I logged into the network with.
"Environ("USERNAME")" also works.


--
colofnature
------------------------------------------------------------------------
colofnature's Profile: http://www.excelforum.com/member.php...o&userid=34356
View this thread: http://www.excelforum.com/showthread...hreadid=544777

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Automatic Cell Population

Not for me.

Windows XP

and I have never seen it offered as a general solution. Username seems
much more robust. Are you on a Novell network. A google search seemed to
associate it with a Novell Network.

--
Regards,
Tom Ogilvy


"colofnature" wrote:


Works for me - returns the ID I logged into the network with.
"Environ("USERNAME")" also works.


--
colofnature
------------------------------------------------------------------------
colofnature's Profile: http://www.excelforum.com/member.php...o&userid=34356
View this thread: http://www.excelforum.com/showthread...hreadid=544777


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Automatic Cell Population


Yup, you're right, the office network is Novell. I just iterated the
environ(x) variables and picked the first one that returned a user
id...

Col


--
colofnature
------------------------------------------------------------------------
colofnature's Profile: http://www.excelforum.com/member.php...o&userid=34356
View this thread: http://www.excelforum.com/showthread...hreadid=544777

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
Automatic Population Zach Excel Discussion (Misc queries) 4 March 15th 07 01:32 PM
Automatic Population? Stacey Excel Worksheet Functions 7 June 8th 06 11:47 PM
Can I have automatic cell population while using combo list? rick Excel Discussion (Misc queries) 7 March 28th 06 05:28 AM
Automatic cell population MazzyMirsa Excel Discussion (Misc queries) 3 February 9th 06 06:15 PM
Automatic Cell population Ali[_3_] Excel Programming 2 August 4th 04 01:02 PM


All times are GMT +1. The time now is 09:45 PM.

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

About Us

"It's about Microsoft Excel"