A
AJ
I have a piece of Excel code as follows
Public Function Refer(ByVal SheetName, ByVal CellName) As Variant
Dim cellref As String
cellref = "'" & SheetName & "'!" & CellName
Refer = Indirect(cellref)
End Function
When I compile this VBA project, I get a 'function not defined' error on the
Indirect function.
Any ideas? I have ensured all VBA libraries are referenced.
Public Function Refer(ByVal SheetName, ByVal CellName) As Variant
Dim cellref As String
cellref = "'" & SheetName & "'!" & CellName
Refer = Indirect(cellref)
End Function
When I compile this VBA project, I get a 'function not defined' error on the
Indirect function.
Any ideas? I have ensured all VBA libraries are referenced.