Advertisement

04.26.2007 at 11:56AM PDT, ID: 22536763
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Accessing network folder that requires username/password via VB

Tags: password, network, folder, username
Hi everyone,

I'm trying to programmatically (VB6 / VBA) access a folder on our network that needs a name and password (the folder is actually an outq on an AS400 box if it matters), and I'm stuck on how to proceed.

The following works for me, but not for my coworker I'm giving this to.  It has worked for me for nearly 2 years without much issue, the only 'issue' ive ever had is that the connection sometimes times out and needs to be 'woken up', and it is my "WakeUp" function thats giving me errors on her computer. Here is the relevant code:

From standard module declarations:
 Public Const PCDAddr As String = "\\server.domain.com\Root\Qsys.lib\Pcdownload.lib\"
 Public PCDFolder As Object

From WakeUp function:
 Dim i As Long, FSO As Object
 Set FSO = CreateObject("Scripting.FileSystemObject")
 If PCDFolder Is Nothing Then
  Set PCDFolder = FSO.GetFolder(PCDAddr)
 Else
  i = PCDFolder.Files.Count
 End If

I am getting a "Path not found" error when it reaches the .GetFolder call.  I've just retested it on my PC and it still works without issue (both are win2k machines).

I copied the server path from the Const statement into windows explorer to see if that was the problem, and in doing so a name/password prompt came up.  She entered her name/pw and was able to get into the folder, so I know the path isn't the issue.

Can anyone think of something I can use (I'm not locked into filesystemobject, only really using it since my original VBScripts had to use it, and I've since imported those into VB6) that will allow me to specify the username/password? Or maybe some workaround?

Please feel free to ask me any questions about this or give alternate suggestions

Thanks!
Matt

(FYI - I'm cross posting this to VB, VB Scripts, and AS/400)
Start your free trial to view this solution
Question Stats
Zone: OS
Question Asked By: mvidas
Solution Provided By: steveberzins
Participating Experts: 1
Solution Grade: A
Views: 58
Translate:
Loading Advertisement...
04.26.2007 at 12:09PM PDT, ID: 18984302

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.26.2007 at 01:07PM PDT, ID: 18984742

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29