VBA Question and Answer, paste answers to specific sheet and cell

Will85

Board Regular
Joined
Apr 26, 2012
Messages
230
Office Version
  1. 365
Platform
  1. Windows
I am trying to up my VBA.

Currently I have three cells with three questions in A1 through C1

First Name?
Last Name?
Account Number?

A user enters the information in B1 through C1, pushes a button and I have VBA that copies that information to the last row of a different sheet then clears the data.

Ideally, I would rather have one macro button that just says "Insert New Account", then asks three questions with three sperate boxes for the user to input the data, then copies takes that user inputted data and pastes it to the last row of a different sheet.

Example. Click button "New Customer"

vba question First Name?
answer Willy

vba question Last Name?
answer Wonka

vba question Account Number
answer 155

vba goes to sheet2 finds the first blank row (assume its row 1099) and copies Willy to A1099, Wonka to B1099, and 155 to C1099
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

My Aswer Is This

Well-known Member
Joined
Jul 5, 2014
Messages
19,116
Office Version
  1. 2013
Platform
  1. Windows
Try this using sheet named "Bravo"
Modify sheet name to your needs
VBA Code:
Sub Ask_Me()
'Modified  4/4/2022  10:25:30 PM  EDT
Dim Lastrow As Long
Lastrow = Sheets("Bravo").Cells(Rows.Count, "A").End(xlUp).Row + 1
Dim ans As String
Dim anss As String
Dim ansss As String
ans = InputBox("Enter First Name")
anss = InputBox("Enter Last Name")
ansss = InputBox("Enter Account Number")

With Sheets("Bravo")
    .Cells(Lastrow, 1).Value = ans
    .Cells(Lastrow, 2).Value = anss
    .Cells(Lastrow, 3).Value = ansss
End With
End Sub
 

Forum statistics

Threads
1,175,794
Messages
5,899,527
Members
434,779
Latest member
Mr1510

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
Top