ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   generate button click (https://www.excelbanter.com/excel-programming/367739-generate-button-click.html)

[email protected]

generate button click
 
how do i code a button click (a vb form button)

I'm using
Sheets("Stats").CommandButton2_Click

This produces the error:
object doesn't support property or method.


HELP!


Jim Thomlinson

generate button click
 
The command button click procedure has to be declared as Public not Private
(Sorry I just got around to answering your last post... Meetings.).

Public Sub CommandButton2_Click()
'do your button click stuff
End sub
--
HTH...

Jim Thomlinson


" wrote:

how do i code a button click (a vb form button)

I'm using
Sheets("Stats").CommandButton2_Click

This produces the error:
object doesn't support property or method.


HELP!




All times are GMT +1. The time now is 08:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com