![]() |
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. |
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 |
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. |
All times are GMT +1. The time now is 06:00 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com