jan McC
June 15th, 2001, 05:52 PM
I would like to find the easiest way to highlight specific text where I have a subroutine passing a value to a richtextbox using Dim ctext as string and the code is somthing like this. I would really appreciate someone's help on this. I have a deadline that has come and gone. Thank-you
{vbcode]
Option Explicit
Private Const Problem_TEXT_HEADER = "<html><head<style>body { font-family: Arial; font-size: 12pt }</style><title></title></head><body bgcolor='#C1E5EB' topmargin='4' leftmargin='6'>"
' <style type = 'text/css'> B {background-color: #HFFFFF;}</style>
Private Const Problem_TEXT_FOOTER = "</body></html>"
Public Sub Test1SetStepProblemText(ByVal UserForm As Test, ByVal StepNumber As Long)
' sets the html text
Dim cText As String
Select Case StepNumber
Case 1
cText = "This is the text and I would like to highlight a few words in the middle of this sentence" _
& " continuing to use the this setup. There is a public constant declaration ."
End Sub
[/vbcode]
{vbcode]
Option Explicit
Private Const Problem_TEXT_HEADER = "<html><head<style>body { font-family: Arial; font-size: 12pt }</style><title></title></head><body bgcolor='#C1E5EB' topmargin='4' leftmargin='6'>"
' <style type = 'text/css'> B {background-color: #HFFFFF;}</style>
Private Const Problem_TEXT_FOOTER = "</body></html>"
Public Sub Test1SetStepProblemText(ByVal UserForm As Test, ByVal StepNumber As Long)
' sets the html text
Dim cText As String
Select Case StepNumber
Case 1
cText = "This is the text and I would like to highlight a few words in the middle of this sentence" _
& " continuing to use the this setup. There is a public constant declaration ."
End Sub
[/vbcode]