ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   What's the vba equivalent of search(text1,string,1)? (https://www.excelbanter.com/excel-programming/376609-whats-vba-equivalent-search-text1-string-1-a.html)

John Smith

What's the vba equivalent of search(text1,string,1)?
 
I tried to use the search function in vba, something like the
following:

position = search(text1, string,1)

and got and error.

How is this done in a macro? Thanks.

Gary Keramidas

What's the vba equivalent of search(text1,string,1)?
 
maybe instr

InStr([start, ]string1, string2[, compare])

--


Gary


"John Smith" wrote in message
...
I tried to use the search function in vba, something like the
following:

position = search(text1, string,1)

and got and error.

How is this done in a macro? Thanks.





All times are GMT +1. The time now is 03:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com