Hi folks, this must be a super simple answer, but my Google-fu is utterly failing me. I have the following module in a workbook hosted on a Sharepoint server (Office 2010,2013,2016 users access the file)
Public Function DelParens(ByVal str As String) As String
While InStr(str, "(") > 0 And InStr(str, ")") > InStr(str, "(")
str = Left(str, InStr(str, "(") - 1) & Mid(str, InStr(str, ")") + 1)
Wend
DelParens = Trim(str)
End Function
The purple line is the code that is highlighted in the debugger.
Public Function DelParens(ByVal str As String) As String
While InStr(str, "(") > 0 And InStr(str, ")") > InStr(str, "(")
str = Left(str, InStr(str, "(") - 1) & Mid(str, InStr(str, ")") + 1)
Wend
DelParens = Trim(str)
End Function
The purple line is the code that is highlighted in the debugger.