Does anyone know why following function gives me run-time error 424, object needed?
VB Code:
Function LookOneBack() As Variant Application.Volatile LookOneBack = Application.Caller.Offset(0, -1).Value End Function
Printable View
Does anyone know why following function gives me run-time error 424, object needed?
VB Code:
Function LookOneBack() As Variant Application.Volatile LookOneBack = Application.Caller.Offset(0, -1).Value End Function
what is this along (sub)?Quote:
Originally Posted by Tobian
Application.Volatile
I am working VB in Excel. It's a VBA function.
No parameters?Quote:
Originally Posted by Tobian
Try
VB Code:
Call Application.Volatile
The bug is in the next row.
Application.Caller don't have any Offset methods
VB Code:
Select Case TypeName(Application.Caller) Case "Range" v = Application.Caller.Address Case "String" v = Application.Caller Case "Error" v = "Error" Case Else v = "unknown" End Select MsgBox "caller = " & v