Guest_imported
New member
- Jan 1, 1970
- 0
hello, i was wondering if someone could help me.
i currently have the user entering a name into an input box, and it works as if a value is entered it will say "you must enter a name", or if a name has been given then it eill go on to ask address. Basically this is what i have as part of the full macro:
Sub CustomerDetails()
Dim Name As String
Dim AddressLine1 As String
Dim AddressLine2 As String
Dim Town As String
Dim County As String
Dim PostCode As String
Name = InputBox("Please enter name in Title/Initial/Surname format"
If Name <> "" Then
Range("A3".Select
ActiveCell.Value = Name
Else
MsgBox "You MUST Enter The Customer's Name"
End If
AddressLine1 = InputBox("Please enter Address Line 1"
If AddressLine1 <> "" Then
Range("A6".Select
ActiveCell.Value = AddressLine1
Else
MsgBox "You MUST Enter Address Line 1"
End If
however i want to modify this so that if nothing is entered i want it to re-ask the user to enter a name or address or whatever. can someone please help me.
cheers
i currently have the user entering a name into an input box, and it works as if a value is entered it will say "you must enter a name", or if a name has been given then it eill go on to ask address. Basically this is what i have as part of the full macro:
Sub CustomerDetails()
Dim Name As String
Dim AddressLine1 As String
Dim AddressLine2 As String
Dim Town As String
Dim County As String
Dim PostCode As String
Name = InputBox("Please enter name in Title/Initial/Surname format"
If Name <> "" Then
Range("A3".Select
ActiveCell.Value = Name
Else
MsgBox "You MUST Enter The Customer's Name"
End If
AddressLine1 = InputBox("Please enter Address Line 1"
If AddressLine1 <> "" Then
Range("A6".Select
ActiveCell.Value = AddressLine1
Else
MsgBox "You MUST Enter Address Line 1"
End If
however i want to modify this so that if nothing is entered i want it to re-ask the user to enter a name or address or whatever. can someone please help me.
cheers