Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MS Project 2003 Application.filesearch runtime error 1004

Posted on 2011-02-25
4
Medium Priority
?
823 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Microsoft has changed the look and feel of Azure AD and Microsoft account sign-in pages so that you will have a more unified look and feel when moving between the two interfaces.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

722 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