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
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
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
 
Upvote 0
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:
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,698
Members
448,979
Latest member
DET4492

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top