Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Public Function Replace(old_text As String, start_num As Long, num_chars As Long, new_text As String) As String
On Error GoTo Err_Replace
If start_num <= Len(old_text) Then
If start_num + num_char <= Len(old_text) Then
Replace = Left$(old_text, start_num - 1) & new_text & Mid$(old_text, start_num + num_chars)
Else
MsgBox "Your number of characters conflicts with the length of your original text", vbExclamation
End If
Else
MsgBox "Your start position conflicts with the length of your original text", vbExclamation
End If
Exit_Replace:
Exit Function
Err_Replace:
MsgBox Err.Number & ": " & Err.Description, vbExclamation
Resume Err_Replace
End Function