LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default ActiveControl problem

I am attempting to service several Excel controls from the same macro code as
shown below:

Sub WHOAMI()
Dim ctrl As Control
Dim getactivectlname, mytext
ctrl = screen.ActiveControl
mytext = ctrl.Name
MsgBox ("The Value Is " & ctrl & " text= " & mytext & " thats all")
End Sub

WHOAMI launches, but on the "CTRL = SCREEN.ACTIVECONTROL" statement I get a
"Runtime Error 424 -- Object Required" error.

This is on Excel XP (2002). Any Ideas? Currently I have no DECLARATIONS.

Thanks for the help. Dave

--
Dave Ackmann
 
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
Started out as an Access problem. Now an Excel problem RobertM Excel Discussion (Misc queries) 2 April 26th 06 07:30 PM
problem with a conditional max problem Brian Cornejo Excel Discussion (Misc queries) 1 February 18th 05 06:25 PM


All times are GMT +1. The time now is 04:11 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"