Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 06-02-2014, 08:09 AM
BobBridges's Avatar
BobBridges BobBridges is offline Get and pass name of clicked ActiveX check box Windows 7 64bit Get and pass name of clicked ActiveX check box Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

Quote:
Originally Posted by Bob Bridges
I think I'd try passing the checkbox object itself.
Quote:
Originally Posted by NobodysPerfect
If that means
Code:
Private Sub CB1a_Click
  Call DoWithBox "CB1a"...
Nope, that's just another way of trying to pass the name of the checkbox. I think this would work:

Code:
Private Sub CB1a_Click
  DoWithBox CB1a
  .
  .
  .
Then in DoWithBox something like
Code:
Sub DoWithBox(cb)
  Select Case cb.Name
    Case "CB1a": 'do whatever
    Case "CB1b": 'do something else
    Case "CB2a": 'and so on
    End Select
  .
  .
  .
I'm not saying that's the way I'd solve the original problem; but if I'd already decided to try to work based on the object name, then this is probably how I'd go about doing that.

Is there a way for a control in the form to refer to itself? I think "Me" refers to the whole form, but maybe some object named "ThisControl" or something? Might simplify coding.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Get and pass name of clicked ActiveX check box How to Pass Document to this Sub ilcaa72 Word VBA 1 01-28-2014 03:04 PM
Get and pass name of clicked ActiveX check box Can pass .expression as a parameter? tinfanide PowerPoint 4 12-28-2012 06:14 PM
How to pass parameters to a .msg file? HereNow Outlook 0 11-05-2012 10:38 AM
Office 2010 Excel Full pass raineraus Excel 1 09-19-2012 12:55 PM
Get and pass name of clicked ActiveX check box How do I Convert All Legacy Check Boxes to ActiveX? GreenPolyps Word 1 12-20-2011 05:11 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:07 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft