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

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

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,090,110
Messages
5,412,497
Members
403,429
Latest member
jmdesk20

This Week's Hot Topics

Top