Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro for FIND & REPLACE file names within the macro

Status
Not open for further replies.

egghi

MIS
Jul 18, 2006
32
US
Hi,

I need to write a VBA function that allows users to find specific text in the macro and replace the text with a new text without using the FIND & REPLACE feature in Excel.

The macro I wrote imports file with names like filename08072006.txt. I am trying to create an form that allows users to enter any date they want and replace the date format in the file name in the macro, and need a macro that runs the function!

I know it can be done because I have seen it before (but cannot find the code any more).

Any ideas? Thanks in advance!

 


Why don't you use an InputBox and do the rest within your existing macro? You could include some error checking there, too.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top