Public Class BrowserUrl Public lBrowser As Boolean = False Public nOperation As Integer = 0 Public nPrimaryKey As Integer = 0 Public cUrl As String = "" ' Get the Url <CLSCompliant(False)> _ Public Function GetUrl(ByVal toBrowser As AxSHDocVw.DWebBrowserEvents2_BeforeNavigate2Event) As Boolean Dim lnLocation As Integer cUrl = toBrowser.uRL cUrl = Mid(cUrl, cUrl.LastIndexOf("\") + 2) If cUrl.StartsWith("LX") Then lBrowser = True toBrowser.cancel = True nOperation = Val(Mid(cUrl, 3, 1)) lnLocation = cUrl.IndexOf(",") nPrimaryKey = Val(Mid(cUrl, 4, lnLocation)) End If End Function End Class