1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

highlighting problem

Discussion in 'C#' started by gilgalbiblewheel, Jun 22, 2006.

  1. #1
    I don't know if I accidentally play around with the script. But now it's showing error:
    Line 210 shows:
    strText = mobjRegExp.Replace(strText,strReplace)
    Code (markup):

    gilgalbiblewheel, Jun 22, 2006 IP
  2. vectorgraphx

    vectorgraphx Guest

    Likes Received:
    Best Answers:
    Trophy Points:
    you're "dim"-ing your strReplace variable inside of a function with "option explicit" declared. You might also notice that the function in which line 210 resides is inside of a function called "highlight", and the dim statement for strReplace is within a seperate function called "HighlightKeywords".

    Also, why do you have 2 functions named "highlight"? Never a good idea. I would rename one of them if i were you.

    Figure out which of your two "highlight" functions you are using and either delete the other, or rename it if it serves a different role in your script.

    Just for GP, you might think about moving ALL your dim statements outside of your functions, it can't hurt, and is generally better practice than declaring your dim's inside of functions. If it were me, i'd declare all of my dim statements immediately following your option explicit declaration.


    vectorgraphx, Jun 23, 2006 IP