i would like to make a function that inserts opening and closing html tags around selected text in a textbox (it wraps the tags around a selected text)

the function would start like

public function wrapTags(tag, additionalstuff, textbox)
'Tag is the HTML tag we want to wrap around selected text
' on the start of the selected text it would add
textbox.seltext = "<" & tag & " " & additionalstuff & ">"
' and on the end of the text it would add
textbox.seltext = "</" & tag & ">"




i would call the function like this:
call wrapTags("HEAD", "bgcolor='black'", "frmMDI.ActiveForm.Text1")



PLEEEEEAAAAASEEEE HELP ME OUT!!


---------------------
~:{Decayed}:~
http://www.q3seek.com