Jeorge
New Member
- Joined
- Nov 27, 2015
- Messages
- 32
Hi Sir/Ma'am,
1. I created a userform that needs information from my office mates like phone number and/or address, I wanted the form to automatically close after a period of time like 2 minutes or less as it happened that after someone opened the form it was left open on one computer which basically restrict others to access it. IF there is a command that I can add to my code to auto close it then that would be very much appreciated.
2. Next question is there a way refresh my time stamp? After I opened my userform time stamp and date stamp the time stamp freeze from the time userform opens, (Please see command below for reference).
Thanks a lot guys for any help
Jeorge
Private Sub Enter_Click()
Dim LastRow As Object
Set NextRow = Sheet1.Range("A10000").End(xlUp)
NextRow.Offset(1, 0).Value = TextBox1.Text
NextRow.Offset(1, 1).Value = ComboBox1.Text
NextRow.Offset(1, 2).Value = TextBox2.Text
NextRow.Offset(1, 3).Value = tbDate.Text
NextRow.Offset(1, 4).Value = tbtime.Text
MsgBox "Phone number Added"
response = MsgBox("Do you want to enter another Phone number?", _
vbYesNo)
If response = vbYes Then
TextBox1.Value = ""
ComboBox1.Value = ""
TextBox2.Value = ""
'This is the missing command to either refresh the time for the next data encoded
TextBox1.SetFocus
Else
Unload Me
End If
End Sub
1. I created a userform that needs information from my office mates like phone number and/or address, I wanted the form to automatically close after a period of time like 2 minutes or less as it happened that after someone opened the form it was left open on one computer which basically restrict others to access it. IF there is a command that I can add to my code to auto close it then that would be very much appreciated.
2. Next question is there a way refresh my time stamp? After I opened my userform time stamp and date stamp the time stamp freeze from the time userform opens, (Please see command below for reference).
Thanks a lot guys for any help
Jeorge
Private Sub Enter_Click()
Dim LastRow As Object
Set NextRow = Sheet1.Range("A10000").End(xlUp)
NextRow.Offset(1, 0).Value = TextBox1.Text
NextRow.Offset(1, 1).Value = ComboBox1.Text
NextRow.Offset(1, 2).Value = TextBox2.Text
NextRow.Offset(1, 3).Value = tbDate.Text
NextRow.Offset(1, 4).Value = tbtime.Text
MsgBox "Phone number Added"
response = MsgBox("Do you want to enter another Phone number?", _
vbYesNo)
If response = vbYes Then
TextBox1.Value = ""
ComboBox1.Value = ""
TextBox2.Value = ""
'This is the missing command to either refresh the time for the next data encoded
TextBox1.SetFocus
Else
Unload Me
End If
End Sub