Script to check text for string ".jpg"

ctinmotion

New Member
Joined
Apr 27, 2010
Messages
11
I have templates that I use to build a database for importing in to DB2. Before we send the data over, we need to run a script which checks the data in certain columns (L, M, N) to make sure that it contains the text ".jpg". Is there a quick and easy macro I can set up so I can run it on all of my templates?

TIA!
 
Kris, when I run the script it opens a file dialog box but it does not display the actual files in the folder. Is there a way I can remove that dialog box alltogether? It might be looking for an actual .xlst (template) file maybe? The workbooks are not saved as actual templates, I just use the word "template" because it is how we refer to them internally. They are all just straight .xls files with Columns A through BA with data. Maybe that is why they are not displaying in the file dialog box?

I would ideally like to just save the script to my Personal.xls file so that I can run it on any open workbook. Is that possible or am I trying to do something that can't be done?

Thanks so much for your help!
 
Upvote 0

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Hi,

You don't need to pick any files. Just pick the folder(I assume the selected folder contains only those templates). The script will loop each file and add ".jpg" if it's missing or replace "jpg" with ".jpg".

Kris
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,287
Members
452,902
Latest member
Knuddeluff

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