LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 421
Default commandbuttons won't trigger code.

Hi Bert,

Your suggestion seems like a simple, straightforward solution.
Thanks


In fact the suggestion was made by
Dave and, therefore, the thanks are
due to him.


---
Regards.
Norman


"Bert" wrote in message
news:ZJ7Tj.971$k11.671@trndny08...
Your suggestion seems like a simple, straightforward solution.
Thanks.

"Norman Jones" wrote in message
...
Hi Bert,

=============
Dave Peterson:

I don't know why it's happening, but as an alternative...


How about adding all the commandbuttons you need, but hide the ones you
don't
need until later. I've always found making something visible is a lot
easier to
do.


Interesting suggestion. If I make the buttons invisible, can I resize
the
Userform to so that I don't have half of it seem empty?
=============

As a schematic example. consider:

'=========
Option Explicit

'-------------
Private Sub UserForm_Initialize()
With Me
.Height = 130
.CommandButton1.Visible = False
.CommandButton2.Visible = False
End With
End Sub

'-------------
Sub CommandButton1_Click()
MsgBox "Hi from CommmandButton1"
End Sub

'-------------
Sub CommandButton2_Click()
MsgBox "Hi from CommmandButton2"
End Sub

'-------------
Private Sub CommandButton3_Click()
With Me
.CommandButton1.Visible = True
.CommandButton2.Visible = True
.Height = .Height + .CommandButton1.Height + 10
End With
End Sub
'<<=========



---
Regards.
Norman




 
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
Trigger or code Curt Excel Discussion (Misc queries) 0 April 20th 07 03:32 PM
How to stop CommandButtons being deleted as pictures in code?? Corey Excel Programming 5 August 15th 06 12:18 PM
Trigger Event Code Shawn Excel Programming 2 July 14th 05 02:33 PM
Trigger code Bourbon[_21_] Excel Programming 5 January 26th 04 04:06 PM


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