LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Application.Caller syntax for worksheets?


It's got to be an obvious mistake, but I'm having trouble with the
following code:


Code:
--------------------
Private Sub cmdInventory_Click()

Dim selOpt As OptionButton
Dim studyName As String

Set selOpt = ActiveSheet.OptionButtons(Application.Caller)

If selOpt.Value = True Then
studyName = selOpt.Name
MsgBox studyName
End If

End Sub
--------------------


Execution from the worksheet yields a:

"Run-time error '1004':

Unable to get the OptionButtons property of the Worksheet class"


Execution from the VBA editor yields a:

"Run-time error '1004':
Application-defined or object-defined error"


What syntax have I goofed??

The examples I have use the above syntax, but I can't seem to get them
to go either...


--
Ouka
------------------------------------------------------------------------
Ouka's Profile: http://www.excelforum.com/member.php...o&userid=23988
View this thread: http://www.excelforum.com/showthread...hreadid=502311

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application.Caller Marcelo Excel Discussion (Misc queries) 6 June 23rd 06 03:07 PM
Row = Application.Caller.Row Charles Woll Excel Worksheet Functions 8 February 28th 05 02:04 PM
Application.Caller Mark Worthington Excel Programming 9 February 12th 04 07:32 PM
application.caller Jase Excel Programming 0 January 6th 04 03:51 AM
Application.caller Clark B Excel Programming 2 July 29th 03 11:17 PM


All times are GMT +1. The time now is 06:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"