View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
[email protected] tkt_tang@hotmail.com is offline
external usenet poster
 
Posts: 92
Default Re : Excel VBA with Run to Reset

cht13er Esq,

Thank you for your response.

1. My case. On to more details.

2. The workbook contains 2 worksheets (each of which is a Filtration
Table) plus another worksheet (used to support Sheet1 and Sheet2, much
like a scratch-pad for storing intermediate results of computations).

3. Since Sheet1 and Sheet2 are similar, the following description of
Sheet1 is as much applicable to Sheet2 (needless to say, the code-
behind for each worksheet is identical ; plus, they share the code
posted in the modules).

4. Sheet1 shows a TextBox and a ComboBox (ActiveX Controls).

5. TextBox1 is served by an event handler of DropButtonClick (which is
acting like a Return Key to be clicked upon completing entry of a text
string thereof). This is not a problem item. Thanksgiving indeed.

6. TextBox1's entry is a key based on which a listing would be
generated to populate the Combox1 in a single column (let's keep
things minimal and simple).

7. The ComboBox1 is served by 2 event handlers namely,
7a. DropButtonClick
7b. Change.

8. The DropButtonClick is used to expand and contract the ComboBox1(as
soon as the DropDown debuts). This controls the width of ComboBox1
according to the variable length of the text strings (each of which is
essentially an English word or an expression daisy-chained by a couple
of hyphens, to say the most).

9. The Change event of ComboBox1 (upon a renewed selection of the text
strings thereof) will be followed suit by yet other computations of
the corresponding macros.

10. The pertinent case is the (instantaneous and unpredictable)
interaction of ComboBox1 events (DropButtonClick and Change ; they are
affecting each other incessantly throughout the process).

11. There is then a labyrinth of additional controls being instituted
to tame the given events at bay.

12. As the worksheets are switched from one to another, it behooves
that "Labyrinth of Additional Controls" to be restored to the
"Primordial States" according to VBE's Run Reset.

13. The resultant code is, needless to say, long, windy and
convoluted ; it's at best unbefitting for display in this
neighbourhood.

14. The code works but it requires the menial intervention by VBE's
Run Reset. In this respect, it hurts the Pride of Automation.

15. Regards.