Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Test whether current drive is local or remote?

you need a reference to Microsoft Scripting Runtime

then something like:

Function DT(sPath As String) As String
Dim fso As New Scripting.FileSystemObject
Dim fsd As Scripting.Drive
Set fsd = fso.GetFolder(sPath).Drive
DT = Choose(fsd.DriveType + 1, _
"unknown", "removable", "fixed", "remote", _
"cdrom", "ramdisk")
End Function

keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Julian Milano" wrote:

How can I test if the workbook's path is a local path or remote path
(like on another PC called, say, "\\JDMils\C\My Documents")?


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
Links to Local Drive Instead of Same Folder TKS_Mark Excel Discussion (Misc queries) 1 May 21st 09 06:07 AM
Links to mapped drive change to refer to local hard drive SueD Links and Linking in Excel 1 May 8th 08 11:42 AM
Coping Embedded documents to local drive... CrosbyKim Excel Discussion (Misc queries) 1 December 4th 07 12:51 AM
Hyperlinks - Move file to local drive, all links break Shawn McGowen Excel Discussion (Misc queries) 1 March 9th 06 12:52 AM
Pasting a range of information from a foler on F Drive to another folder on same drive Tom Ogilvy Excel Programming 1 August 3rd 03 01:50 AM


All times are GMT +1. The time now is 08:40 AM.

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"