File Search

Mat Key

New Member
Joined
Apr 3, 2002
Messages
4
I need help.

I have a macro that goes through a daily list of teams and their results, and imports it into a generic template and saves it as the team/rep name in a specific folder on my desktop.
The next time this macro runs, it searches for the report name, and if it has already been created, it opens it up and imports the new data after the older data. This works fine, and has done every day for the last 4 odd months, however today I have an issue.

When the macro tries to create a file for the team name "OCA", it looks to see if it has already created this file (which it hasnt) but returns a true value, and attempts to open it.
What it is doing is trying to open a file with OCA in the title (eg: lOCAtion).

How do I do an obsolute search on a variable?
Currently I have this line in the macro:

.FileName = Report_Name

I have tried using .MatchCase and that doesnt work, and I have tried .MatchTextExactly but that wont work cause Im on a Mac.

Any thoughts would be appreciated.

Cheers.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Hi,

Im using Excel 98 for a Mac. I have worked out a way around it using error handlers but it's a bit messy. If there was a better way then that would be good to know.

Mat
 
Upvote 0

Forum statistics

Threads
1,214,386
Messages
6,119,212
Members
448,874
Latest member
b1step2far

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top