Solved

MS Project 2003 Application.filesearch runtime error 1004

Posted on 2011-02-25
4
816 Views
Last Modified: 2013-11-15
I have a problem with MS project.
When running MS P local the application.filesearch works great.
But when running MSP via Citrix Atlas desktop it gives runtime error 1004?

Can anybody help?


Kind regards

Eric
Sub Realisation_Week_Schedule()
' Macro Realisation_Week_Schedule
' Macro Recorded Fri 15.01.10 14:45 by EUROPE\252218.
   Dim y As Variant
    Dim fLdr As String, Fil As String, FPath As String
     
    y = "Realisation*.xls"

    '**********************************************************************
     'fLdr = BrowseForFolderShell

        fLdr = "V:\Data\Livelink\" & Environ("UserName") & "\OTlocal\Livelink\Workbin"
    
     '**********************************************************************
    With Application.FileSearch
        .NewSearch
        .LookIn = fLdr
        .SearchSubFolders = True
        .FileName = y


        On Error GoTo 0
        If .Execute() > 0 Then
            For i = 1 To .FoundFiles.Count
                Fil = .FoundFiles(i)
                 'Get file path from file name
                FPath = Left(Fil, Len(Fil) - Len(Split(Fil, "\")(UBound(Split(Fil, "\")))) - 1)
                If Left$(Fil, 1) = Left$(fLdr, 1) Then
                    If CBool(Len(Dir(Fil))) Then Kill Fil
                
                End If
            Next i
        End If
    End With
     
  
    
    ViewApply Name:="01. SABIC Gantt Chart"
    FilterApply Name:="&All Tasks"
    OutlineShowAllTasks
    'CalculateAll
    ViewApply Name:="61. SABIC Realisation week schedule"
    SelectTaskColumn Column:="Work", Additional:=6
    EditCopy
    
Set objIEApp = CreateObject("InternetExplorer.Application")

objIEApp.Navigate "http://livelink.intranet.europe.sabic.com/Livelink/llisapi.dll?func=Edit.Edit&nodeid=96421372&nexturl=%2FLivelink%2Fllisapi%2Edll%3Ffunc%3Dll%26objId%3D96421372%26objAction%3Dbrowse%26sort%3Dname"

objIEApp.Visible = True

Set objIEApp = Nothing
    
End Sub

Open in new window

0
Comment
Question by:Eric Zwiekhorst
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 19

Expert Comment

by:basraj
ID: 35240378
Is it happening for all the users? If only one user, then please recreate the Citrix profile and check again.
0
 
LVL 6

Author Comment

by:Eric Zwiekhorst
ID: 35240606
It is happening to all users
0
 
LVL 19

Accepted Solution

by:
basraj earned 500 total points
ID: 35241034
I think the problem is Citrix server is not able to reach the files as you mentioned in above code. Can you try the code directly on the server and fix there first?
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

After several days of searching and hunting for limited documentation, I wanted to share this guide to hopefully save someone the hassle of trying to figure this out on their own. I have tested this on Xendesktop 7.1 and PS 4.5 running simultaneous…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
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…

734 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