Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Userform button
From another thread I worked how to disable and "grey out" a "commandbutton",
but I am using a Userforms "Button" is it possible to grey out this type of button? -- Trefor |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Userform button
Exactly the same
Me.CommandButton1.Enabled = False -- HTH RP (remove nothere from the email address if mailing direct) "Trefor" wrote in message ... From another thread I worked how to disable and "grey out" a "commandbutton", but I am using a Userforms "Button" is it possible to grey out this type of button? -- Trefor |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Userform button
Bob,
Sorry what is "Me"? And for "Button 30" is it CommandButton30? Can you use CommandButton(1)? -- Trefor "Bob Phillips" wrote: Exactly the same Me.CommandButton1.Enabled = False -- HTH RP (remove nothere from the email address if mailing direct) "Trefor" wrote in message ... From another thread I worked how to disable and "grey out" a "commandbutton", but I am using a Userforms "Button" is it possible to grey out this type of button? -- Trefor |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Userform button
The keyword 'Me' refers to the object that contains it. So for a
class module, it refers to that instance of the class, for a userform, it refers to the form, etc. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Trefor" wrote in message ... Bob, Sorry what is "Me"? And for "Button 30" is it CommandButton30? Can you use CommandButton(1)? -- Trefor "Bob Phillips" wrote: Exactly the same Me.CommandButton1.Enabled = False -- HTH RP (remove nothere from the email address if mailing direct) "Trefor" wrote in message ... From another thread I worked how to disable and "grey out" a "commandbutton", but I am using a Userforms "Button" is it possible to grey out this type of button? -- Trefor |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Userform button
Chip,
Sorry I am new to VBA and whatever you just said went way over the top of my head! ;) As for Class modules, I have not got passed Modules yet. Can you help me out this some code for a Module please? -- Trefor "Chip Pearson" wrote: The keyword 'Me' refers to the object that contains it. So for a class module, it refers to that instance of the class, for a userform, it refers to the form, etc. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Trefor" wrote in message ... Bob, Sorry what is "Me"? And for "Button 30" is it CommandButton30? Can you use CommandButton(1)? -- Trefor "Bob Phillips" wrote: Exactly the same Me.CommandButton1.Enabled = False -- HTH RP (remove nothere from the email address if mailing direct) "Trefor" wrote in message ... From another thread I worked how to disable and "grey out" a "commandbutton", but I am using a Userforms "Button" is it possible to grey out this type of button? -- Trefor |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Userform button
Is that button on a userform?
If yes, is the code to disable the button behind that userform? If yes, then Me refers to that userform. If the button is on a worksheet and is a commandbutton from the control toolbox toolbar and the code is behind that worksheet, then Me refers to that worksheet. Trefor wrote: Chip, Sorry I am new to VBA and whatever you just said went way over the top of my head! ;) As for Class modules, I have not got passed Modules yet. Can you help me out this some code for a Module please? -- Trefor "Chip Pearson" wrote: The keyword 'Me' refers to the object that contains it. So for a class module, it refers to that instance of the class, for a userform, it refers to the form, etc. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Trefor" wrote in message ... Bob, Sorry what is "Me"? And for "Button 30" is it CommandButton30? Can you use CommandButton(1)? -- Trefor "Bob Phillips" wrote: Exactly the same Me.CommandButton1.Enabled = False -- HTH RP (remove nothere from the email address if mailing direct) "Trefor" wrote in message ... From another thread I worked how to disable and "grey out" a "commandbutton", but I am using a Userforms "Button" is it possible to grey out this type of button? -- Trefor -- Dave Peterson |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Userform button
Trefor,
You may not know it, but userform code modules are a specific type of class module. If you want to disable a button on a userform, there must be something, some situation, that will determine when that button is to be disabled. What is that? Also, as you call it Button 30, it makes me think that you are referring to worksheets not a userform at all. Can you clarify? -- HTH RP (remove nothere from the email address if mailing direct) "Trefor" wrote in message ... Chip, Sorry I am new to VBA and whatever you just said went way over the top of my head! ;) As for Class modules, I have not got passed Modules yet. Can you help me out this some code for a Module please? -- Trefor "Chip Pearson" wrote: The keyword 'Me' refers to the object that contains it. So for a class module, it refers to that instance of the class, for a userform, it refers to the form, etc. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Trefor" wrote in message ... Bob, Sorry what is "Me"? And for "Button 30" is it CommandButton30? Can you use CommandButton(1)? -- Trefor "Bob Phillips" wrote: Exactly the same Me.CommandButton1.Enabled = False -- HTH RP (remove nothere from the email address if mailing direct) "Trefor" wrote in message ... From another thread I worked how to disable and "grey out" a "commandbutton", but I am using a Userforms "Button" is it possible to grey out this type of button? -- Trefor |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Disable Exit button on a UserForm | Excel Discussion (Misc queries) | |||
Looping procedure calls userform; how to exit loop (via userform button)? | Excel Programming | |||
disable the x button on a userform | Excel Programming | |||
How to disable the Exit Button of UserForm in Excel? | Excel Programming | |||
Disable close button of Modeless Userform | Excel Programming |