Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Replace in VBA Excel
In Visual basic you can use the Replace function to remove
unwanted characters. What would you use in VBA tom accomplish the same. When I try to use the replace function, it gives an error "Sub or function is not defined" Maurice |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Replace in VBA Excel
Maurice,
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. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Maurice" wrote in message ... In Visual basic you can use the Replace function to remove unwanted characters. What would you use in VBA tom accomplish the same. When I try to use the replace function, it gives an error "Sub or function is not defined" Maurice |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Replace in VBA Excel
Thanks,
That did it for me!!!! Maurice -----Original Message----- Maurice, 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. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Maurice" wrote in message ... In Visual basic you can use the Replace function to remove unwanted characters. What would you use in VBA tom accomplish the same. When I try to use the replace function, it gives an error "Sub or function is not defined" Maurice . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find and Replace - Replace with Blank Space | Excel Discussion (Misc queries) | |||
Can I replace a ' at the beginning of a text cell using Replace | Excel Discussion (Misc queries) | |||
find and replace - replace data in rows to separated by commas | Excel Worksheet Functions | |||
replace value in excel? | Excel Worksheet Functions | |||
How can I use replace(alt+H) for mutiple items needing replace | Excel Worksheet Functions |