vba remove remove ileagal file name characters

The solution for “vba remove remove ileagal file name characters” can be found here. The following code will assist you in solving the problem.

Private Function ValidWBName(Arg As String) As String
Dim RegEx As Object
Set RegEx = CreateObject(“VBScript.RegExp”)
With RegEx
.Pattern = “[\\/:\*\?””<>\|]”
.Global = True
ValidWBName = .Replace(Arg, “”)
End With
End Function

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

Similar Posts