Workbooks.Open with a network path

Hello

I'm trying to do a Set SrcWrkBook = Workbooks.Open(\\networkdrive\ folder 
one\ folder two\filename.XLS, True, True)

I assume the white spaces and perhaps the  \\ are giving me issues.  How do 
I get around this?



0
Peter
4/14/2010 3:10:42 PM
excel.programming 6508 articles. 2 followers. Follow

1 Replies
1231 Views

Similar Articles

[PageSpeed] 46

That first argument (your path and filename) needs to be a String value, so 
it needs quote marks around it. Also, I'd be willing to bet that there are 
no leading spaces in front of  your folder names. My guess is your line 
should look like this (note, this line is long, so I expect it will word 
wrap at a required blank space)...

Set SrcWrkBook = Workbooks.Open("\\networkdrive\folder one\folder 
two\filename.XLS", True, True)

-- 
Rick (MVP - Excel)



"Peter" <noMorespam@MSUK.com> wrote in message 
news:e2kenS#2KHA.4540@TK2MSFTNGP04.phx.gbl...
> Hello
>
> I'm trying to do a Set SrcWrkBook = Workbooks.Open(\\networkdrive\ folder 
> one\ folder two\filename.XLS, True, True)
>
> I assume the white spaces and perhaps the  \\ are giving me issues.  How 
> do I get around this?
>
>
> 
0
Rick
4/14/2010 3:30:25 PM
Reply:

Similar Artilces:

Workaround for Opening Word 6 Files (other than File>Open)?
Hi all, I know in Word 2008 I can open my Word 6 files using File>Open. This works fine but annoys the heck out of me. MS has made a "security" choice here that is about *their* security from possible lawsuits, not *my* security from possible phishers. Sheesh, I am trying to look at my dissertation; no one has embedded dangerous code in it! So, my question is: Is there a workaround for this? Ideally there'd be a preference to turn off this "feature," but I'm sure there isn't one. Alternately, perhaps a way to batch change the document type on o...

Error printing report: "specified path for the output file does
Hi - I'm trying to print a Payable Distribution History report but get the error "specified path for the output file does not exist". It does not happen with other reports. Any help to fix this error would greatly appreciated. thanks Oumar hi Oumar, go check the Report Destination screen and make sure that there is no path listed in the field where you can enter one. It would be in the File checkbox. If it is grayed out, mark the File option, delete the path and then unmark the File box. Should you want to save it to a file, then select a valid path. Hop...

csv file will not open
Hi, we are exporting (save as) report data to csv on a Novell network. when Excel 2003 sp1 attempts to open the csv file, we get a message that the file is read only. the file does not open. we can export the data to csv on the local computer and open it in excel just fine. we can open the csv file that has been created on the network drive using notepad, word and access. Your help is greatly appreciated. Scott ...

Shared User Issue When Opening Database
I have an issue this afternoon which, I feel probably isn't directly related to Access, but would be grateful for guidance if anyone has experienced this before. I have a database (default open mode - shared) which, this afternoon, won't allow a second user to open it. If a second user tries to open the database a message box is displayed quoting the path of the database file plus "The parameter is incorrect" The database is located on a shared folder on our network. Thanks for any assistance. Dave ONLY the data should be on a shared folder, not th...

problem Opening jpg's only
Recently, in Outlook 2003, I noticed that I can';t open and view jpg's anymore. Other attachements (mpg, pdf) are fine. I get the message: 'The system cannot find the file specified' I can save the file to disk and can view it easily just by clicking on it. It happens whether McAfee antivirus is enabled or disabled. I don't think it is level 1 attachments which are being blocked as in Microsoft Knowledge Base Article - 829982. Any ideas would be appreciated. Thanks Craig I am having the same issue. Any suggestions would be helpful! Thanks Jeremy >-----Original M...

unable to open password protected PST file...
I have password protected a private PST file. When I open Outlook 2002 and click on the PST file - it asks for my password. If I just click cancel there - I see no way to open that file again unless I quit Outlook and come back in. When I click on the PST file, I would have thought it would have asked for the password again, but it gives a different error and no where can you specify the password... Any ideas? Thanks, Brad Can you clarify why you are clicking on Cancel the first time Outlook prompts for your password? Normally, one would just enter the pw at the prompt and your'...

Open new form based on two criteria
I have a main form that I need to be able to open another form that is based on two different fields on the main form. This is what I have: Private Sub cmdOpenForm_Click() On Error GoTo Err_cmdOpenForm_Click Dim stDocName As String Dim stLinkCriteria As String stDocName = "SFRM_AllLocationsperContract" stLinkCriteria = (((TBL_LocationContract.ContractNumber) = "&[Forms]! [FRM_CompanyAddContracts]![txtContractID]&") And ((TBL_LocationContract. CompanyID) = "&[Forms]![FRM_CompanyAddContracts]![txtCompanyID]&")) DoCmd...

opening forwarded mail
I have looked through all my setting and still can't figure this one out. When someone forwards me a message that they received, i will sometimes get it as a small envelope (attachment). When I double click on it, nothing happens. When I save it to my desktop, it isn't recognized. But, when I open it with my webmail there isn't a problem. I can double click on pictures and they open fine, but not these types of email. Does anyone have anything they can assist with so I don't always have to go through my webmail? Thanks, Sam dreamer <safer@home.net> wrote: >...

mail does not find temporay directory to open attached .xls file
Since few weeks, I cannot open attached .xls file, for the temporary directory is not found. I bypass it by saving the xls file in a a folder and then open it from there. It does't work if saved on desktop. All other attached files, pps or world, are ok -- Are all your Windows Updates current? I seem to recall there was an update for IE8 a couple of months ago which fixed the failure to open attachments. --=20 Gary VanderMolen, Microsoft MVP (Mail) Microsoft MVP program: http://mvp.support.microsoft.com "escofie" <escofie@discussions.microsoft.com&...

Hyperlink problem to cell in same workbook
I have a hyperlink created by a VB program that should link to a cell on a different worksheet within the same book. The hyperlink code currently is as follows: =HYPERLINK(ADDRESS(4,2,1,FALSE,"MultipleAliases"),"MULTIPLE DP ALIASES") MultipleAliases is a separate worksheet and I want the link to jump to row 4 cell 2 on this sheet. I realise that normally you need a spreadsheet identifier as part of the worksheet definition, thus the "MultipleAliases" would be "[FILE1.XLS]MultipleAliases" if this was saved as FILE1.XLS. If I do save this file wi...

summarize open issues
i have 3 different open issues lists on 3 tabs of a workbook that i want to summarize the priority items onto one list on another tab. i want to tick off items in priority order by a,b,c etc. and collect them in sorted priority order all on one tab. does anyone have any ideas how i can do this? i appreciate any help you can provide. thank you If desired, send your file to my address below. I will only look if: 1. You send a copy of this message on an inserted sheet 2. You give me the newsgroup and the subject line 3. You send a clear explanation of what you...

Incompatible version Money 2004 error when opening with Money 2005
I installed Money 2005, download the update, then try to use my existing money 2004 file. I have also make my money 2004 repaired. And success with no error in data structure. But the money 2004 still failed to open with 2005. It said incompatible version with Money 2005. Why? I also have tried using salvage as suggested by microsoft help support, but still failed to open with money 2005. Can somebody help my problem? Thank you. You must stay within region when upgrading UK > UK and US > US is OK but you can't do UK > US. See http://umpmfaq.info/faqdb.php?q=1 -- Re...

UNC Path using DNS alias (CNAME) on local server doesn't work
I have many windows server 2003 servers. On all of our file shares/SQL servers we use CNAMES for easy DR changes and testing. Primarily we only use DNS aliases from clients to the servers We installed a new app that has a database of UNC locations. The app uses these locations to do some file copies. The problem seems to be that the server itself cannot access the \\myalias\myshare from itself. Extremely strange. When i try to go to run and type this UNC path using the alias on the server itself i get prompted with a username/password dialog. Any credentials i enter here fail. we a...

How to control network shares programatically?
Hello, I am trying to discover a non-GUI method of recording a network share's permissions and security settings, taking the share off-line, doing a bit of maintenance on the data on the share, bringing the share on-line again, and restoring all of the security and permission settings. Only the top level (shared folder) permissions and security settings need to be preserved. The individual files don't have special settings. The general NET SHARE commands can remove and install a shared folder, but can't help record and manage the security and permissions settings. I'm tr...

Opening an Excel template from a 3rd party app
I am running a 3rd party app & have have created a menu item in this app which opens a Excel template. The only problem that it opens the Excel template and not a xls file based on the template & this causes sharing problems as multple users use this spreadsheet. Is there a switch or different command in the command line that I have to put in to open as an xls file? The command line I have is: Excel.Sheet.8, [Open("F:\Excel Forms\Application Form.xlt")] Using Excel 2002 TIA -- Tony Barb. I tried "New" in the command line & it worked!. Many thanks ...

can't open microsoft outlook on vista machine
I loaded outlook express on my machine, newlaptop with vista and I can't open it. Any suggestions? "pagegirl26" <pagegirl26@discussions.microsoft.com> wrote in message news:6CDD0072-7CFB-4F6B-ABEF-91F74BE25BFE@microsoft.com... >I loaded outlook express on my machine, newlaptop with vista and I can't >open > it. Any suggestions? You can load Outlook Express on a Vista machine. -- Brian Tillman [MVP-Outlook] On Tue, 21 Oct 2008 13:27:01 -0700, pagegirl26 <pagegirl26@discussions.microsoft.com> wrote: > I loaded outlook express on my machine, ne...

Crm3 to Crm4: error on page when opening/closing contacts
OK, another similar to a lot of people, but I do not have a solution. I am presently testing in lab upgrading from CMR 3 to 4 and finds myself with a strange one. Anytime I open a contact, and this happens only with contacts, I get an "error on page" at the bottom of the browser window and once I close it, there is a "pop-up" to send information to Microsoft for the error which contains the following; 1.0 Expected ')' 75 /Orthofab/sfa/conts/edit.aspx /Orthofab/sfa/conts/ edit.aspx Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; FunWebProducts; SLCC1; .NET CLR 2....

How do I open attachments that appear as shortcuts
All email older than 90 days has evidently been auto-archived and shows as a shortcut. When I open the shortcut, I can see the email text and attachment, but attachments will not open. Get various error messages depending on the format of the attachment (.pdf, .doc, .xls, etc.). How do I access the attachments to these files? My IT has re-imaged my computer and when I initially log into Outlook for the first time, I can see all email and attachments. Then the systems begins synchronization and all email previously seen as shortcuts are shortcuts once again. HELP! "Tr...

.xls Report opens rather than Snapshot Report
I�m using AK2000. The database has seven users and is split into a frontend and backend. The backend is on a novell server. The frontends are located on the users pc�s. All of the users have identical frontends and they were able to E-Mail reports in snapshot format. A few days ago when two of the users tried to E-Mail snapshot reports the reports were created in .xls format rather than .snp format. I have had our IT staff reload snapshotviewer on the two pc�s, however, that did not fix the problem. Has anyone had any problems like this? Were you able to fix it? ...

Outlook 2003: Message Box Appears: "Can't open this item. Out of memory or system resources. Close some or programs and try again"
I had a problem, found the solution, and thought I'd post my findings instead of being simply greedy and moving on my way. :) Problem: When running Outlook 2003, I'm was receiving a message box (pop up window) when trying to open any email or item: "Can't open this item. Out of memory or system resources. Close some or programs and try again." Solution: Apparently, this catch all message appears for a host of reasons, and it appears to be a message that's been around for a loong time based on returns from Yahoo! searches. So no one person's solution applies to...

automatically open outlook after booting
In Win 98, my Outlook would automatically open up after boot up. How do I get Outllok to open on boot up in XP Pro? Add a shortcut to Outlook to your Startup group under Start | All Programs... Just drag and drop the shortcut to that group. -- Aloha, -Ben- Ben M. Schorr, OneNote-MVP http://home.hawaii.rr.com/schorr **I apologize but I am unable to respond to direct requests for assistance. Please post questions and replies here in the newsgroup. Mahalo! "ron@tbep.org" <anonymous@discussions.microsoft.com> wrote in message news:1519c01c3c407$332d2e40$a601280a@phx.gbl....

How to navigate to a password protected network folder
Hello all, I have a folder stored on my work VPN. In Windows Explorer, after connecting to the VPN, I can navigate to the folder by typing its address in the address bar. Windows then asks me for some logon credentials and I can navigate the folder. Trying to use PowerShell to navigate to the same folder brings up an "Access Denied" message. I was wondering if there was any way to enter my user credentials so that PowerShell can navigate the location? Thanks --Amr I assume that you talk about network share. In this case you need to use NET USE command: net u...

unable to open excel file
I cannot open an excel file on the network, an error occur that "filename.xls cannot be accessed.The file may be read-only,or you may be trying to access a read-only location.Or, the server the document is stored on may not be responding" The excel file was not a read only and I can access other on the network.I used excel 97 SR-2. I already try to open the file on excel 2000 SR-3. Please help i cannot open the file. What exactly happen to the file? Thanks! Try to copy the file to your C drive and see if you can open it from there. Vaya con Dios, Chuck, CABGx3 "jju...

When starting Outlook Error:Unable to open your default e-mail fol
I just installed Outlook 2003 and when i open it a box comes up saying Configuring Outlook with "Migrating Account Settings" highlighted in a list. Then an error pops up saying: Unable to open your default e-mail folders This error can occur if you attempt to run Outlook from a Terminal Server session when the OST file is in use by the console session. To access this instance of Outlook, exit the current Terminal Server session and start a new session by using the following Run command (click Start, then click Run): mstsc.exe /CONSOLE You must be an administrator on the computer ...

reconnecting to a SBS network
We had a large problem (previous post "SBS 2k3 sp2 problem after power off "posted May13 I posted my solution there). I was forced to set up a peer to peer network inorder to keep us runningand take care of our clients. Now that I have the server back up again I was wondering if there was a way ro reconnect to the SBS2k3 SP2 network without using the //server/connectcomputer setup. To set up the peer to peer I went through the properties of my computer and changed from a domain to a workgroup, then set the nic cards to static ip addresses (192.168.0.xx) of my temp netwo...