jazzyt2u
06-29-2009, 09:45 AM
Hi,
If a cell length in column B is over 26 an input box shows them the current data and asks them to shorten the data.
Is there a way to either:
a) put the information that's in the cell into the inputbox so they only have to edit it instead of typing from scratch?
Or
b) is there some other source I can use aside from an inputbox that will capture what is in the cell and allow the user to edit and then replace the current information with the edited information?
Additionally can there be an input limit where it won't allow user to enter more than 26 characters?
What I have:
DescrpInput = InputBox("The current description:" & vbNewLine & vbNewLine & ActiveCell & vbNewLine & _
vbNewLine & "Is too long. Please shorten it to 26 characters including spaces.")
Do Until DescrpConfrm = 1
If Len(DescrpInput) > 26 Or DescrpInput = "" Then
Do Until Len(DescrpInput) < 27 And DescrpInput <> ""
If DescrpInput = "" Then
DescrpInput = InputBox("Please enter a replacement for:" & vbNewLine & vbNewLine & ActiveCell)
ElseIf Len(DescrpInput) > 26 Then
DescrpInput = InputBox("The description:" & vbNewLine & vbNewLine & DescrpInput & vbNewLine & _
vbNewLine & "Is still too long. Please shorten it by " & Len(DescrpInput) - 26 & " characters.")
End If
Loop
End If
DescrpConfrm = MsgBox("To confirm, the new description is:" & vbNewLine & vbNewLine & DescrpInput, vbOKCancel)
If DescrpConfrm = 2 Then
DescrpInput = InputBox("You canceled your entry. Please enter a replacement for:" & vbNewLine & vbNewLine & ActiveCell & vbNewLine & _
vbNewLine & "Or for the entered you just canceled:" & vbNewLine & vbNewLine & DescrpInput)
End If
Loop
rngT20.Select
ActiveCell = DescrpInput
Selection.AutoFill Destination:=rngTD20, Type:=xlFillCopy
If a cell length in column B is over 26 an input box shows them the current data and asks them to shorten the data.
Is there a way to either:
a) put the information that's in the cell into the inputbox so they only have to edit it instead of typing from scratch?
Or
b) is there some other source I can use aside from an inputbox that will capture what is in the cell and allow the user to edit and then replace the current information with the edited information?
Additionally can there be an input limit where it won't allow user to enter more than 26 characters?
What I have:
DescrpInput = InputBox("The current description:" & vbNewLine & vbNewLine & ActiveCell & vbNewLine & _
vbNewLine & "Is too long. Please shorten it to 26 characters including spaces.")
Do Until DescrpConfrm = 1
If Len(DescrpInput) > 26 Or DescrpInput = "" Then
Do Until Len(DescrpInput) < 27 And DescrpInput <> ""
If DescrpInput = "" Then
DescrpInput = InputBox("Please enter a replacement for:" & vbNewLine & vbNewLine & ActiveCell)
ElseIf Len(DescrpInput) > 26 Then
DescrpInput = InputBox("The description:" & vbNewLine & vbNewLine & DescrpInput & vbNewLine & _
vbNewLine & "Is still too long. Please shorten it by " & Len(DescrpInput) - 26 & " characters.")
End If
Loop
End If
DescrpConfrm = MsgBox("To confirm, the new description is:" & vbNewLine & vbNewLine & DescrpInput, vbOKCancel)
If DescrpConfrm = 2 Then
DescrpInput = InputBox("You canceled your entry. Please enter a replacement for:" & vbNewLine & vbNewLine & ActiveCell & vbNewLine & _
vbNewLine & "Or for the entered you just canceled:" & vbNewLine & vbNewLine & DescrpInput)
End If
Loop
rngT20.Select
ActiveCell = DescrpInput
Selection.AutoFill Destination:=rngTD20, Type:=xlFillCopy