Load Vb Functions

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
 
J

John Wilson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top