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: 81
Default Programatically click CommandButton

The following expression works fine and clicks CommandButton #1:-
Call UserForm1.CommandButton1_Click

Is it possible to assign a variable to the number of the button clicked,
along the lines:-

For X=1 to 5 step 1
Call UserForm1.CommandButton(X)_Click
(Then does what clicking the CB does)
Next X

This doesn't work, but I don't know if the fault is incorrect syntax,
or that the expression simply cannot take a variable.
donwb


 
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
after click a button(commandbutton), getting the button name x taol Excel Programming 3 February 15th 08 09:35 PM
Capture/Passing Commandbutton click WLMPilot Excel Programming 5 January 18th 08 06:00 PM
DTPicker Control: Can you programatically fire the click event? [email protected] Excel Programming 0 April 24th 06 10:37 PM
Click on graph bar to execute a double-click in a pivot table cell [email protected] Charts and Charting in Excel 4 August 3rd 05 01:37 AM
Mouse Over Graph, Capture Information on Click(Double Click) Dean Hinson[_3_] Excel Programming 1 December 6th 04 04:49 AM


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