Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Les Les is offline
external usenet poster
 
Posts: 240
Default Disgarding lnk files

Hello.

I am writing some VBA in excel which auto-archives files in a set of
folders/subfolders. All's going well, other than when the
application.filesearch command encounters a shortcut, it tries to archive the
file the shortcut points to.

I need to isolate the .lnk files to disregard them.

I've tried to isolate the shortcuts using '.filename = "*.lnk"', but to no
avail.

Could anyone please tell me how to isolate them?

Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Disgarding lnk files


Have u tried this:


Code
-------------------
.FileType = msoFileTypeExcelWorkbook
-------------------

--
ilyaskaz
-----------------------------------------------------------------------
ilyaskazi's Profile: http://www.excelforum.com/member.php...fo&userid=2396
View this thread: http://www.excelforum.com/showthread.php?threadid=47905

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Disgarding lnk files

.filename like "*.lnk"

to demonstrate from the immediate window:

sStr = "C:\My folder\My File.lnk"

? sStr like "*.lnk"
True
sStr = "C:\My folder\My File.xls"
? sStr like "*.lnk"
False


--
Regards,
Tom Ogilvy


"Les" wrote in message
...
Hello.

I am writing some VBA in excel which auto-archives files in a set of
folders/subfolders. All's going well, other than when the
application.filesearch command encounters a shortcut, it tries to archive

the
file the shortcut points to.

I need to isolate the .lnk files to disregard them.

I've tried to isolate the shortcuts using '.filename = "*.lnk"', but to no
avail.

Could anyone please tell me how to isolate them?

Thanks in advance.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Navigating to Excel files over network slow, but not Word files Newbie123 Excel Discussion (Misc queries) 1 December 2nd 09 01:18 PM
How can I batch convert 97-2003 .xls files to 2007 .xlsx files Dave Nuttall Excel Discussion (Misc queries) 4 August 3rd 09 11:38 PM
Excel 2007 tmp files filling up drive with XLSM files Jim Excel Worksheet Functions 0 September 12th 08 03:31 PM
How to change default Open/Files of Type to "Microsoft Excel Files Tammy Excel Discussion (Misc queries) 2 January 14th 08 11:06 PM
Drive Erased, got Files back but only excel files scrambled, help. Shawnky Excel Discussion (Misc queries) 0 May 8th 06 07:26 PM


All times are GMT +1. The time now is 06:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"