CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 1999
    Posts
    2

    Replace in VBScript doesn't work

    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


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: Replace in VBScript doesn't work

    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).


  3. #3
    Join Date
    Jul 1999
    Posts
    2

    Re: Replace in VBScript doesn't work

    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


  4. #4
    Join Date
    May 1999
    Posts
    3,332

    Re: Replace in VBScript doesn't work

    wow, I copied your sample and it works without errors!
    Even better, I have my macros back.
    Thanks for the hint.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured