I have the following code... cell G1 of worksheet Fund List contains a counta function for the length of the data
Public Function getname(Ticker As String, Day As Date)
Dim DataFileName As String
Dim rng As Range
Dim Lines As Integer
Lines = Workbooks("MASTER FUND LIST").Worksheets("Fund List").Range("G1").Value + 3
Set rng = Workbooks("MASTER FUND LIST").Worksheets("Fund List").Range(Cells(4, 5), Cells(Lines, 9))
DataFileName = Application.VLookup(Ticker, rng, 5, False)
getname = DataFileName
End Function
It works on my computer at home, but not at my office.
At home I use Office XP while at work it is 2003 - could that be the problem? If so is there something to do to make it work on 2003 and/or on both versions.
If it not a version issue, what else could it be?
Thanks
Public Function getname(Ticker As String, Day As Date)
Dim DataFileName As String
Dim rng As Range
Dim Lines As Integer
Lines = Workbooks("MASTER FUND LIST").Worksheets("Fund List").Range("G1").Value + 3
Set rng = Workbooks("MASTER FUND LIST").Worksheets("Fund List").Range(Cells(4, 5), Cells(Lines, 9))
DataFileName = Application.VLookup(Ticker, rng, 5, False)
getname = DataFileName
End Function
It works on my computer at home, but not at my office.
At home I use Office XP while at work it is 2003 - could that be the problem? If so is there something to do to make it work on 2003 and/or on both versions.
If it not a version issue, what else could it be?
Thanks