I am trying to design a macro to check for a file in a particular folder. the files may either be an excel file or a txt file. can you please help me with code?
I am trying to design a macro to check for a file in a particular folder. the files may either be an excel file or a txt file. can you please help me with code?
I have a similar question about this topic. I am looking to actually open up that folder to see if the file exists. Here is what I’m trying to accomplish. I have a excel file that is populated with numbers in column A and column B. Column A Column B <TABLE class=MsoNormalTable style="MARGIN: auto auto auto 4.65pt; WIDTH: 211.6pt; BORDER-COLLAPSE: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" cellSpacing=0 cellPadding=0 width=282 border=0><TBODY><TR style="HEIGHT: 14.25pt; mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"><TD style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0in; BORDER-LEFT: windowtext 1pt solid; WIDTH: 98pt; PADDING-TOP: 0in; BORDER-BOTTOM: windowtext 1pt solid; HEIGHT: 14.25pt; BACKGROUND-COLOR: transparent; mso-border-alt: solid windowtext .5pt" vAlign=bottom noWrap width=131>70209-82542-107 <?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
</TD></TR></TBODY></TABLE>
<o></o> I need to do a search in an external folder for that number that’s in column B. This file will always be a PDF but could exist more than once in that folder. The files will always be in the same folder. Search needs to be done in this directory.
sushrd01\departments\Qualassur\SCANNED RAW MAT'L CERTS\
Any help would be appreciated. I’m using Excel 2007. Thanks
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.