Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default active control box name on worksheet

Hi

i have tried to find the answer to this,

I ahve used a control box command button and want to determine its name from
code so i can use this elsewhere. i know application.caller does not work

Private Sub ToggleMonth1_Click()
Dim CtrlName As String
With Worksheets("DP + SDS")
ctrlname = ? 'help it should be toggleMonth1

End With


End Sub

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/201006/1

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default active control box name on worksheet

In a standard module, declare a public string variable (one line at the top)
Public strCtlName as String

In the Sheet module...
Private Sub ToggleMonth1_Click()
strCtlName = Me.ToggleMonth1.Name
'other code
End Sub
--
Jim Cone
Portland, Oregon USA
Review of Special Sort add-in...
http://www.contextures.com/excel-sort-addin.html






"pjbur2005 via OfficeKB.com" <u18722@uwe
wrote in message
Hi
i have tried to find the answer to this,
I ahve used a control box command button and want to determine its name from
code so i can use this elsewhere. i know application.caller does not work

Private Sub ToggleMonth1_Click()
Dim CtrlName As String
With Worksheets("DP + SDS")
ctrlname = ? 'help it should be toggleMonth1
End With
End Sub
--
Message posted via OfficeKB.com

Reply
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
Difference between a Forms Control verus Active-X Control funGT350 Excel Discussion (Misc queries) 6 May 6th 08 11:20 PM
how to set active x control sharlie Excel Discussion (Misc queries) 0 March 30th 06 01:27 AM
Active X Control Help Grant Excel Programming 3 November 2nd 04 09:14 PM
Tool Tip Text for Form control/ Active-X control Freddie[_2_] Excel Programming 0 October 19th 04 04:14 AM
Active X Control Anand CS Excel Programming 0 July 9th 03 05:02 AM


All times are GMT +1. The time now is 08:05 PM.

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"