the code i have now works fine but i dont know the variable code to add...heres my code now.
Sub NewMassDriverTest()
Dim MyInput As String
Dim mycode As String
MyInput = InputBox("THIS WILL ADD A MASS DRIVER! MAKE SURE YOU WANT A MASS DRIVER", _
"DRIVER NAME", "Enter Drivers Name FIRST,LAST here")
'myinput is the name field for the driver
If MyInput = "Enter your input text HERE" Or _
MyInput = "" Then
Exit Sub
End If
'enter name in field
'the reason i use e11 is because it's centrally located in the field of names
If MyInput > "0" Then
Sheets("dashboard").Select
Range("E11") = MyInput
'mycode is the "short name" for the driver
mycode = InputBox("Enter Driver Code", "Driver Code", "Enter Code Here....Duh. LOL")
If mycode = "Enter Code Here." Or mycode = "" Then
Exit Sub
End If
If mycode > "0" Then
Sheets("dashboard").Select
Range("F11") = mycode
End If
Range("E7:K17").Select
Selection.sort Key1:=Range("E7"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
end if
end if
End Sub

New Topic/Question
Reply




MultiQuote




|