Macro not starting

  • Thread starter Thread starter Larry
  • Start date Start date
L

Larry

I've got a strange one here. On some of my macines this
macro works while others don't. I've checked to be sure
everyone's on the same rev....still no luck.

Any ideas? Here's the macro that is being used:

Public Function GetValueFromSheet(C As String, L As
Integer) As String
FName = ActiveSheet.Range("D1:E1").Cells(1, 1).Value
SName = ActiveSheet.Range("D1:E1").Cells(1, 2).Value
GetValueFromSheet = Workbooks(FName).Worksheets
(SName).Range(C & L).Value
End Function

And the cell formula looks like this:
 
Try this and let me know if it makes a difference:

Public Function GetValueFromSheet(C As String, L As
Integer) As String
FName = ActiveSheet.Cells(1, 4).Value
SName = ActiveSheet.Cells(1, 5).Value
GetValueFromSheet = Workbooks(FName).Worksheets.(SName).Range(C
L).Value
End Function

- Piku
 
Back
Top