473,386 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

trying to use windoze UNC in VBA to reach files in share points?

MLH
I tried this in a module...

call lineinputthing("\\MLH\Shared Docs\Leads.txt","26MAY08Garages")

The machine name is MLH. The share name is "Shared Docs". The file
name is Leads.txt. But VBA does not understand
\\MLH\Shared Docs\Leads.txt.

The actual location of the share is
C:\Documents and Settings\All Users\Shared Docs\
but windoze does not let you address it directly within a command
window. You can't even cd to Shared Docs from
C:\Documents and Settings\All Users\

You can do dir Shared Docs from C:\Documents and Settings\All Users\
Yes, that'll give you a DIR listing.

The lineinputthing procedure is a sub expecting 2 string arguments.
And the first of them is a text file. The text file is Leads.txt. If
Leads.txt is saved in c:\mystuf\ - then there is no problem at all.
It's just the UNC that I can't seem to get VBA to understand.

How does one refer to share points using UNC or other name convention?
Ideas? Comments?

Jun 27 '08 #1
4 1808
MLH wrote:
I tried this in a module...

call lineinputthing("\\MLH\Shared Docs\Leads.txt","26MAY08Garages")

The machine name is MLH. The share name is "Shared Docs". The file
name is Leads.txt. But VBA does not understand
\\MLH\Shared Docs\Leads.txt.
Since you have spaces in the path you probably need to pass a quoted path to
your function...

Chr(34) & "\\MLH\Shared Docs\Leads.txt" & Chr(34)

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Jun 27 '08 #2
MLH
On Mon, 26 May 2008 07:13:51 -0500, "Rick Brandt"
<ri*********@hotmail.comwrote:
>MLH wrote:
>I tried this in a module...

call lineinputthing("\\MLH\Shared Docs\Leads.txt","26MAY08Garages")

The machine name is MLH. The share name is "Shared Docs". The file
name is Leads.txt. But VBA does not understand
\\MLH\Shared Docs\Leads.txt.

Since you have spaces in the path you probably need to pass a quoted path to
your function...

Chr(34) & "\\MLH\Shared Docs\Leads.txt" & Chr(34)
Unfortunately not. No, it produces a 3078 error ...
The Microsoft Jet database engine cannot find the input table or query
'26MAY08Garages"'

Notice that it thinks the table name is 26MAY08Garages" ==with a dbl
quote at the end.
Jun 27 '08 #3
MLH wrote:
On Mon, 26 May 2008 07:13:51 -0500, "Rick Brandt"
<ri*********@hotmail.comwrote:
>MLH wrote:
>>I tried this in a module...

call lineinputthing("\\MLH\Shared Docs\Leads.txt","26MAY08Garages")

The machine name is MLH. The share name is "Shared Docs". The file
name is Leads.txt. But VBA does not understand
\\MLH\Shared Docs\Leads.txt.

Since you have spaces in the path you probably need to pass a quoted
path to your function...

Chr(34) & "\\MLH\Shared Docs\Leads.txt" & Chr(34)

Unfortunately not. No, it produces a 3078 error ...
The Microsoft Jet database engine cannot find the input table or query
'26MAY08Garages"'

Notice that it thinks the table name is 26MAY08Garages" ==with a dbl
quote at the end.
I fail to see how what I suggested would have any bearing on how your second
argument is interpretted. I only suggested that the first argument be so
wrapped.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Jun 27 '08 #4
MLH
On Mon, 26 May 2008 08:44:01 -0500, "Rick Brandt"
<ri*********@hotmail.comwrote:
>MLH wrote:
>On Mon, 26 May 2008 07:13:51 -0500, "Rick Brandt"
<ri*********@hotmail.comwrote:
>>MLH wrote:
I tried this in a module...

call lineinputthing("\\MLH\Shared Docs\Leads.txt","26MAY08Garages")

The machine name is MLH. The share name is "Shared Docs". The file
name is Leads.txt. But VBA does not understand
\\MLH\Shared Docs\Leads.txt.

Since you have spaces in the path you probably need to pass a quoted
path to your function...

Chr(34) & "\\MLH\Shared Docs\Leads.txt" & Chr(34)

Unfortunately not. No, it produces a 3078 error ...
The Microsoft Jet database engine cannot find the input table or query
'26MAY08Garages"'

Notice that it thinks the table name is 26MAY08Garages" ==with a dbl
quote at the end.

I fail to see how what I suggested would have any bearing on how your second
argument is interpretted. I only suggested that the first argument be so
wrapped.
Big oops. My fault. Unfortunately the Chr$(34) wrappers didn't
do the trick - applying them as you suggested this time. Line
that failed: Open MyTextDiskFile For Input As #1

Oh well. I tried. Thx, Rick.
Jun 27 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Peter Row | last post by:
Hi, Can someone give me a set of steps for an ASP.NET project (well actually its just a VB.NET class DLL that implements HttpHandler) that will work when moved to another developers machine? ...
8
by: John K. | last post by:
Hi I was wondering if it's possible to use the WebRequest class to access a file on windows shared folder with authentication? If yes, what would the syntax be? I've tried to look this up in the...
2
by: Peter | last post by:
Hi I have this situation where I need to upload a file to the server which is not web-server where the application relies, because my web servers are in the cluster and if the user uploads some...
1
by: Craig Burkett | last post by:
I have set up a virtual directory using IIS which points to a share on another machine. I want to be able to acquire a list of folders and/or files which exist in that share via the virtual...
12
by: Ron Weldy | last post by:
I have a test server runinng 2003/IIS 6 with a mixture of asp and asp.net files. On my workstation I have a share set up to the folder where the web files reside. I am just doing quick and dirty...
1
by: Tim Marsden | last post by:
HI If I have 2 strings each containing a Path string, but in different formats. e.g. 1. "D:\My Folder\My Sub Folder\A.txt" and 2. "\\ComputerA\Share B\A.txt" Now do I compare these to...
2
by: David | last post by:
How do I share code across files in C#, without including a reference to a class library. Here's what I want to do. I have a device I want to talk to. It's a machine in a factory. It can talk...
3
by: Henners | last post by:
Hi There We are migrating our network file system from Novell to Windows. (There are pros and cons).... In this process, we have noticed that a good bunch of user created access databases...
1
by: Kesavan | last post by:
I install apache2 in /usr/local/apache2 and install php5 by ./configure --with-apxs2=/usr/local/apache2/bin/ apxs PHP is successfully installed in my system. But now my .php files inside...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.