Hi...! Need little help with the macro input box. Thanks`

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
Sub inputbox_user()
Dim username As String
username = InputBox("Please enter you full name")
Cells(1, 1).Value = username
End Sub


Whenever the user enters the user name i want them to find next empty cell in col a in sheet1 and keep the username.

now what it deos is that it just find Cells(1, 1).Value that is A1 and replace the other username

Thanks in advance,
Pedie
 

VoG

Legend
Joined
Jun 19, 2002
Messages
63,651
Try

Code:
Sub inputbox_user()
Dim username As String
username = InputBox("Please enter you full name")
Range("A" & Rows.Count).End(xlUp).Offset(1).Value = username
End Sub
 

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
Vog. thanks that was quick.
I'm not very famliar with offset thing..but i think i have to figure out myself...


Thanks again.!:eek:
 

VoG

Legend
Joined
Jun 19, 2002
Messages
63,651
You are welcome.

If you just wanted to get the Windows logon name you could use

Code:
Sub input_user()
Range("A" & Rows.Count).End(xlUp).Offset(1).Value = Environ("username")
End Sub
 

Forum statistics

Threads
1,085,410
Messages
5,383,492
Members
401,833
Latest member
Davezilla

Some videos you may like

This Week's Hot Topics

Top