I got this code from aladin a while back, and started to play around with it. How would i get this into VBA to work?

=SUBSTITUTE(RIGHT(A7,LEN(A7)-SEARCH("-@-",SUBSTITUTE(A7,"","-@-",LEN(A7)-LEN(SUBSTITUTE(A7,"",""))))),".xls","")

A7 would not be the value being read in, but instead Foundfiles(i) which is from my loop. how would i read this into 1 variable name?

thanks

[ This Message was edited by: robfo0 on 2002-04-19 00:45 ]

[ This Message was edited by: robfo0 on 2002-04-19 01:23 ]