View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
sarndt sarndt is offline
external usenet poster
 
Posts: 37
Default Textbox and SpinControl - Class

Hi Joel
I've been playing with this all day and can't figure out what you are
suggesting...Would you be able to provide code that you do what you are
suggesting?

Thanks
Steve

"sarndt" wrote:

So if I have 8 textboxes on the worksheet, is the two dimensional array sized
as
clseventstb(1 To 8, 1 To 8) - with the class name in all 8 positions of the
first index and the textbox name in all 8 position of the second index?

"joel" wrote:


I think your problem is very simple. Look at this line of code in the
Module code:

Set clsEventsTB = New TBClass

Everytime you create a new instance you destroy the old instance
because clsEventsTB is a single variable. Make it a two dimensional
array with the class assigned to one index and the name of the control
as the second index in the array. When the event is triggered you need
to get the name of the control and then look up the control name to find
the class object in the array.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=164025

Microsoft Office Help

.