|
-
Feb 18th, 2006, 09:58 AM
#1
Thread Starter
Member
wrong data type?
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
-
Feb 18th, 2006, 09:59 AM
#2
Frenzied Member
Re: wrong data type
 Originally Posted by Tobian
Does anyone know why understanding 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)?
Application.Volatile
oh1mie/Vic

-
Feb 18th, 2006, 10:03 AM
#3
Thread Starter
Member
Re: wrong data type?
I am working VB in Excel. It's a VBA function.
-
Feb 18th, 2006, 10:08 AM
#4
Frenzied Member
Re: wrong data type?
 Originally Posted by Tobian
I am working VB in Excel. It's a VBA function.
No parameters?
Try
VB Code:
Call Application.Volatile
oh1mie/Vic

-
Feb 18th, 2006, 10:16 AM
#5
Thread Starter
Member
Re: wrong data type?
The bug is in the next row.
-
Feb 18th, 2006, 03:17 PM
#6
Frenzied Member
Re: wrong data type?
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
oh1mie/Vic

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|