Colleagues,
I am writing code for a procedure which receives 2 arguments/parameters: tcFileIn, tcFileOut, both As String,
e.g.
In the parameters' verification section, I have the following code:
When I test it in VS 2012 IDE with 2nd parameter absent
- it shows the tcFileOut is the same as the tcFileIn.
Step-by-step run showed that it does enter into the If-End If construct and executes this line with String.Replace() but... see above.
IOW, tcFileIn.Replace() doesn't work the way I expect.
What am I doing wrong?
Please advise!
TIA!
Regards,
Ilya
I am writing code for a procedure which receives 2 arguments/parameters: tcFileIn, tcFileOut, both As String,
e.g.
Code:
Sub Read_Write_XML(ByVal tcFileIn As String, Optional ByVal tcFileOut As String = "")
In the parameters' verification section, I have the following code:
Code:
If tcFileOut = "" Then
tcFileOut = tcFileIn.Replace(".XML", "_Out.XML")
End If
When I test it in VS 2012 IDE with 2nd parameter absent
Code:
Read_Write_XML(sDataDir & "InputFile.xml")
- it shows the tcFileOut is the same as the tcFileIn.
Step-by-step run showed that it does enter into the If-End If construct and executes this line with String.Replace() but... see above.
IOW, tcFileIn.Replace() doesn't work the way I expect.
What am I doing wrong?
Please advise!
TIA!
Regards,
Ilya