Function RightStr( origstring As String, searchstring As String ) As String
	Dim begintrim As Integer	' where to actually start the trim (necessary when searchstring is more than one character)
	Dim pos As Integer				' position of searchstring inside original string
	Dim length As Integer			' length of searchstring
	' get length of searchstring where original string is to be trimmed
	length = Len(searchstring)
	If length = 0 Then
		' no search string was given exit returning original string
		RightStr = origstring
		Exit Function
	End If
	' see if searchstring is in origstring
	pos = Instr ( origstring, searchstring )
	If pos>0 Then
		' the search string was found, lets truncate at that point
		length = Len( origstring )
		begintrim = length - pos
		RightStr = Right( origstring, begintrim)
	Else
		' the search string was not found, return the original string
		RightStr = origstring
	End If
End Function