I have a list of items:
- B100Q91, B75NX2, BR100, XN20ZN..
I want to remove the first set of numbers in every item, so that it looks like this:
- BQ91, BNX2, BR, XNZN..
My approach looks like this:
Function RemoveFirstNumbers(Txt As String) As String
With CreateObject("VBScript.RegExp")
Dim posn As Integer
posn = GetPositionOfFirstNumericCharacter(Txt)
1
If (IsError(posn)) = True Then Replace(Txt, 1, 1) As String
Dim posn As Integer
Else
End With
End Function
End If
GoTo 1
with
Public Function GetPositionOfFirstNumericCharacter(ByVal s As String) As Integer
Dim i As Integer
For i = 1 To Len(s)
Dim currentCharacter As String
currentCharacter = Mid(s, i, 1)
If IsNumeric(currentCharacter) = True Then
GetPositionOfFirstNumericCharacter = i
Exit Function
End If
Next i
End Function

vb.netis not the same asVBAand you should tagregexp- I've made those changes for you.