Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Macro stopping on different drive

Posted on 2013-11-08
3
Medium Priority
?
183 Views
Last Modified: 2013-11-08
Hi Guys, I have a Macro, which is on the w drive, but if my colleague wants to run it on the v drive, it will stop. How do you find out the exact server name so everyone can use the same program? Here's my code:

  Workbooks.Open Filename:= _
        "w:\Treasury Finance Controls\Ledger v SS Recs\Recs - Murex_GBO\2013 Recs\11_2013 Recs\OBS\Full Ledger\" & PrevDay & "\ALM OBS " & PrevDay & "*.xlsx" _
        , Origin:=xlWindows
    Rows("3:3").Select
0
Comment
Question by:Justincut
  • 2
3 Comments
 
LVL 53

Accepted Solution

by:
Rgonzo1971 earned 2000 total points
ID: 39633446
Hi,

Yhave to give the UNC File Path which is the same for both of you

Open Windows Explorer / Computer on the side of the Drive letter is the UNC address which is like
\\something.in.the.address\

and use it to replace the drive letter

Regards
0
 

Author Comment

by:Justincut
ID: 39633504
it says "finance on 'Cluster Node 2 (sgbmmg001) DFS,Bltechley (mercury)' (v:)"

so how do I adapt the code?
0
 
LVL 53

Expert Comment

by:Rgonzo1971
ID: 39633533
Hi,
In Windows 7 you can select 'network location' if you right click the columns in explorer

to have the network location

Regards
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question