Excel Problem

Soldato
Joined
18 Oct 2002
Posts
7,515
Location
Maidenhead
Hi all,

Got a problem with Excel over citrix. On some of our servers, my macro runs fine, however, on others it fails. Can anyone help with what reference we need to add to the systems?



TIA
 
Hi ALC

Don't know the answer but you appear to be referencing Excel Application functions ok and not VBA. So I would check in References that you have "Visual Basic for Applications" but then again I don't see how any of it would run without.

I have an over the top workaround which effectively uses the Excel function LEFT which cannot be accessed from the Application.WorksheetFunction route :

Public Sub a2()
Dim nsName As String
Dim lstrip As Integer
nsName = "NS_Project Manager"
lstrip = 3
nameleft = MLEFT(nsName, lstrip)
retNs = Worksheets("NewStarter").Cells(16, 1)
MsgBox retNs
Worksheets("NewStarter").Cells(16, 1) = ""
End Sub

Public Function MLEFT(sstr As String, nleft As Integer)
Worksheets("NewStarter").Cells(16, 1) = _
"=LEFT(" & Chr(34) & sstr & Chr(34) & "," & nleft & ")"
End Function

Hope this helps

DT
 
Back
Top Bottom