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
 

Some videos you may like

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

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
 

Watch MrExcel Video

Forum statistics

Threads
1,089,992
Messages
5,411,712
Members
403,391
Latest member
electropro

This Week's Hot Topics

Top