'Attribute VB_Name = "McRitchie_substitute" Option Explicit Function URL_n(str) As String 'David McRitchie, 2003-07-14 for language.htm 'usage =personal.xls!url_n(...) URL_n = Application.Substitute(Application.Substitute( _ Application.Substitute(Application.Substitute(str, _ "%3A", ":"), "%2F", "/"), "%3D", "="), "%3F", "?") End Function Function URL_x(str) As String 'David McRitchie, 2003-07-14 for language.htm 'usage =personal.xls!url_x("http://abc.com") '-- turned out did not need on language.htm page URL_x = Application.Substitute(Application.Substitute( _ Application.Substitute(Application.Substitute(str, _ ":", "%3A"), "/", "%2F"), "=", "%3D"), "?", "%3F") End Function