Solved

MS Project 2003 Application.filesearch runtime error 1004

Posted on 2011-02-25
4
815 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

"Disruption" is the most feared word for C-level executives these days. They agonize over their industry being disturbed by another player - most likely by startups.
Learn how ViaSat reduced average response times for IT incidents from 10 minutes to 30 seconds.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
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 …

735 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