View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Selecting files with file name in Worksheet

As I said, put the filename into a multiselect Listbox and have the user
select the fil;es to delete in the listbox. Then delete the select items in
the listbox. It is equivalent to what you are trying to do and easier to
program.

"Haroon" wrote:

i have lots of files in the folder, but the filenames in the worksheet are
limited and i want to highlight filenames which are in the worksheet and
delete them.


"Rick Rothstein" wrote:

I'm not sure if VB can do that to Windows Explorer or not, but my question
is "why do that"? I mean, you can't be doing it to simply show the names to
the user (they can already see them in the worksheet), so what is it you
want to do with those "highlighted" filenames? Perhaps VB can do that step
for you directly.

--
Rick (MVP - Excel)


"Haroon" wrote in message
...
yeah i have window explorer/folder open too.

i want to run the macro to highlight the files in explorer according to
file
names on the worksheet.

"Joel" wrote:

What are you trying to do? Do you have an explorer open and want to show
only certina files? A file by itself can't get selected, it must be in
some
sort of window.

"Haroon" wrote:

Hi

I have list of filenames in worksheet, and i want to find out if there
is a
way of selecting the files in a given folder, e.g. c:\test, to be
selected
with the filenames in the worksheet?

e.g. file name in worksheet is test1
filename in folder c:\test1.xls
when i run the macro, it goes through the list of filenames in the rang
a1:a100, and hightlights files in that folder c:\test1.xls, test2.xls
etc.

thanks in advance :)