Load Vb Functions

  • Thread starter Thread starter Maurice
  • Start date Start date
M

Maurice

Hiw do you load VB functions into a VBA EXCEL program. I
specifically want to use the replace function to remove
unwanted characters in .csv file that I am opening and
using the value to make comparisons.

Thanks
maurice
 
Maurice,

You didn't mention what version that you're using.

Copied from an earlier post by Chip Pearson:

<snip>
Replace was added to VBA in version 6, or Excel 2000, so it is not
available in earlier versions. In its place, you can use

Result = Application.WorksheetFunction.Substitute(...)

to call the SUBSTITUTE worksheet function from within VBA. See
help in Excel for SUBSTITUTE for syntax details.
<snip>

John
 
Back
Top