Replace Command

Results 1 to 2 of 2

Thread: Replace Command

  1. #1
    Join Date
    Dec 1969

    Default Replace Command

    Error Message: Cannot use parens when calling a Sub -- THIS IS THE PART OF MY CODE -- Replace(stNames, "a" ,"z", 1, -1, 1)----Whats Wrong Here?<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Replace Command

    Replace is a function and returns a value.... vbscripts treat functions like subs when you do not assign them to a variable and subs cannot be called with parens around the parameters unless you do it like this...<BR><BR>call sub()<BR><BR>But still that is rendundant here I think your problem is you want to do it like this<BR>stNames = Replace(stNames, "a" ,"z", 1, -1, 1)

Posting Permissions

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