×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Excel VBA Button Click Event calls subroutine multiple times!

Excel VBA Button Click Event calls subroutine multiple times!

Excel VBA Button Click Event calls subroutine multiple times!

(OP)
Hello,

The subroutine associated with a Button Click Event under Excel 97 VBA executes itself repeatedly after the initial click.  It does eventually stop after 50 or so iterations.  The button is located on a form.  I have reviewed my code closely and cannot find any reason for this.  E.g., there are no loops in the subroutine.

VBA bug?  Any ideas?

Thanks

RE: Excel VBA Button Click Event calls subroutine multiple times!

rveel,
Without the code there is no way to assist you. You say there is no loop in the code, but what is it supposed to do and how does it know when it is done?


Bryan Meek
bmeek@pacbell.net
http://www.handtech.com/meekent
A "Solution Provider" in your corner gives you the personal attention you need to find the right technology solutions for your business.

RE: Excel VBA Button Click Event calls subroutine multiple times!

(OP)
Hello Bryan,

Thanks for your message.  I isolated and worked around the problem today (see below) by replacing the two commented lines with the equivalent third line.  I still do not understand the original behavior, but it appeared as if the commented lines generated additional CategoryComboBox_Click()events.
   
-Bob


*******************************************
Private Sub CategoryComboBox_Click()
   Dim i As Single

   'CategoryComboBox.BoundColumn = 0
   'i = CategoryComboBox.Value
   i = CategoryComboBox.listIndex

   'other commented-out code

End Sub

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close