Click to See Complete Forum and Search --> : Replace in VBScript doesn't work


The Eric
July 28th, 1999, 01:05 AM
I am trying to use Replace in a macro for devstudio 6 sp3 but it keeps giving me the error Type mismatch 'Replace'

I even copied the sample code right out of the documentation and it gives the same error.


sub testing
Dim MyString
MyString = Replace("XXpXXPXXp", "p", "Y")
end sub




I'm useing Visualstudio 6 Proffesional SP3 on a pIII450 256MBRam running Win98

any sudjestions would be helpfull, and I have tried reinstalling everything.

Eric

Lothar Haensler
July 28th, 1999, 01:49 AM
I can't really answer your question, but you mentioned that you write a macro in INterdev 6.
I used to have a few macros for interdev 1 but found that interdev 6 doesn't support macros.
How do you write a macro in Interdev 6?

(BTW - I use Replace in VBScript all the time, but only in DHTML pages or ASPs).

The Eric
July 28th, 1999, 02:24 AM
not interdev, devstudio. I guess it could also be called VC++6. but it also edits vbscript, html, and others. Its what i use to develop most of my projects for school, mainly because its what we have at school. And i kinda like the Editor, especially with the macros.

Eric

Lothar Haensler
July 28th, 1999, 02:50 AM
wow, I copied your sample and it works without errors!
Even better, I have my macros back.
Thanks for the hint.