Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Automatic Population | Excel Discussion (Misc queries) | |||
Automatic Population? | Excel Worksheet Functions | |||
Can I have automatic cell population while using combo list? | Excel Discussion (Misc queries) | |||
Automatic cell population | Excel Discussion (Misc queries) | |||
Automatic Cell population | Excel Programming |