File Path Question??

austin350s10

Active Member
Joined
Jul 30, 2010
Messages
321
I have workbook setup that uses a set of variables stored into stings. The way I have this script working right now is the variable becomes part of the file name when saving
. Ex. File Name: "2010-Assessment-Data- For-" & (Var1) & (var2) & ".xmls"

I was able to make this set-up work and save the file to the desktop but I am looking for a little more. I want to be able to save this file to a network path like: "S:/Clients\Holding File\**Files**"

Does anyone know first who to test if the S: network is even active?
If no network active then create a folder on the desktop Named: "Clients" Even if its already there "Prompt to overwrite"

Can this be done while at the same time allowing the users an out "Exit Sub"

Any ideas would great,

-Austin-
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Try this :

Code:
    Set objFSO = CreateObject("Scripting.FileSystemObject")
        
    If objFSO.FileExists("S:\Clients\Holding File\*") = True Then

    End If


Success,
Erik
 
Upvote 0
The above does not seem to work correctly. I am not sure if it makes a difference but the path I am checking for is from a fileserver in the office. I just need a script to check if the connection to the S: drive is valid or not.

If a valid connection is detected then continue with other code. If not then exit sub.

I know for a fact that the full file path of S:/Clients/Holding File is on the S; drive because I am the one who controls what files go on the server.

Is there a way to just test the connection to a mapped network drive?
 
Upvote 0

Forum statistics

Threads
1,215,429
Messages
6,124,844
Members
449,193
Latest member
MikeVol

We've detected that you are using an adblocker.

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.
Go back
Back
Top