View Single Post
 
Old 04-22-2021, 10:00 AM
Steve Kunkel Steve Kunkel is offline Windows 10 Office 2019
Advanced Beginner
 
Join Date: May 2019
Location: Seattle area
Posts: 81
Steve Kunkel is on a distinguished road
Default

Thanks for moving this to the correct forum. I was able to edit your above find and replace definitions to use the value from my text box. The below code works perfectly and I'm able to simply call my above posted function, which is nice.

Code:
Private Sub cmdLeftPad_Click()
    Call DoFindClean("([ A-Z]@[!^13^l]{1,})", (txtPadding.Value) & "\1", 0, 1)
    Call DoFindClean((txtPadding.Value) & "([ ]@<)", "\1" & (txtPadding.Value), 0, 1)
End Sub
Private Sub cmdRightPad_Click()
    Call DoFindClean("([ A-Z]@[!^13^l]{1,})", "\1" & (txtPadding.Value), 0, 1)
End Sub
Reply With Quote