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: 47
Default How to make Class Module universal

[Excel 2007 & 2003, WinXP SP2]
I have several class modules that are used to control groups of similar
controls. I also have several forms which have some similar controls,
and I have created different class modules for each form.
Is there a way to identify which form has triggered the class module,
and use that as a variable in the class module?
Here's an example of some code in one of my spinbutton class modules:
can I identify the form that triggered the event, and use that as a
variable to replace "frmStatistics" ?

Private Sub StatSpinGroup_SpinUp()
Dim strName As String
Dim iStat As Integer
strName = "txt" & Replace(StatSpinGroup.Name, "spn", "")
iStat = Val(frmStatistics.Controls(strName).Text)
frmStatistics.Controls(strName).Text = iStat + 1
End Sub


Thanks.
Darren
 
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
how to make range names universal in workbook april Excel Discussion (Misc queries) 3 June 8th 09 08:33 PM
Can I group multiple spreadsheets to make universal changes? AndrewEdmunds Excel Discussion (Misc queries) 5 October 31st 08 04:26 PM
Make VBA Class Module Library Mark Olsen Excel Programming 1 March 27th 06 12:01 AM
Make A Universal Time Converter [email protected] New Users to Excel 1 December 2nd 04 04:31 AM
Variable from a sheet module in a class module in XL XP hglamy[_2_] Excel Programming 2 October 14th 03 05:48 PM


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