Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
792 B
2
Indexable
Never
Sub Register_Person()

'Declare variables
Dim name As String
Dim Email As String
Dim Phone As String
Dim Street As String
Dim City As String
Dim Zip As String

'User Input
name = InputBox("Please Enter Your Name")
Email = InputBox("Please Enter Your Email")
Phone = InputBox("Please Enter Your Phone Number")
Street = InputBox("Please Enter Your Street Address")
City = InputBox("Please Enter Your City")
Zip = InputBox("Please Enter Your Zip Code")

'Record Data
Sheets("Sheet1").Select
Range("A1").Select
ActiveCell.offset(1, 0) = name
ActiveCell.offset(0, 1) = Email
ActiveCell.offset(0, 2) = Phone
ActiveCell.offset(0, 3) = Street
ActiveCell.offset(0, 4) = City
ActiveCell.offset(0, 5) = Zip

MsgBox ("Your personal information has been recorded")

End Sub