View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
sacrum[_2_] sacrum[_2_] is offline
external usenet poster
 
Posts: 4
Default writing to next row in sheet


"Dave Peterson" wrote in message
...
Sometimes, it gets to be a pain--for both you and the responders--when you
post
multiple messages to various newsgroups.

If you really think you have to post to several newsgroups (usually
unnecessary), you can cross post to all at once--just send one message,
but send
it to all the newsgroups you want.

It helps you when you're searching for answers and it stops others from
responding to an already answered question.

And it also helps you by having others correct/enhance other suggestions.



sacrum wrote:

sorry bob....

this works:

Option Explicit
Private Sub Workbook_open()
Dim x As Object
Dim u As String
Dim t As Date
Dim LastRow As Long

Set x = CreateObject("WSCRIPT.Network")

With Worksheets("FrontScreen")
.Activate
.Unprotect
u = x.UserName
t = Now
'update text box "Last Updated:"
.TextBoxes("txtLogon").Text _
= "Welcome to IRIS " & u & " - Access Time: " _
& Format(t, "hh:mm:ss")
.Protect
End With

With Worksheets("Log")
LastRow = Worksheets("log").Cells(.Rows.Count, "A").End(xlUp).Row
With .Cells(LastRow + 1, "A")
.Value = u
With .Offset(0, 1)
.Value = t
.NumberFormat = "mm/dd/yyyy hh:mm:ss"
End With
End With
End With

End Sub

**thanks Dave


--

Dave Peterson


hands up it was a mistake Dave.....to busy rushing around.