Re: Enable CommandButton1

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




Hello Terri,

Here is code you need to Enable your Command Button. Remeber when
referencing the Command Button from to include the Worksheet in the
reference.

Public Sub EnableButton()

Dim CmdBtn1 As Object

Set CmdBtn1 = Worksheets("Sheet1").Shapes("CommandButton1")
CmdBtn1.ControlFormat.Enabled = True

End Sub


Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=18465
View this thread: http://www.excelforum.com/showthread.php?threadid=545719

.



Relevant Pages

  • [ANN] XMLmind XML Editor 3.2.0 : support DITA
    ... In order to support DITA simply and elegantly, ... It is now possible to bind a command to the ... Referencing Document now properly refreshes ... CSS support: it is no longer necessary to ...
    (comp.text.xml)
  • Re: Problem adding to "Easy MDI Document Window"
    ... Public Sub OnBeginShutdown(ByRef custom As System.Array) Implements ... ByRef custom As System.Array) Implements ... Command command = commands.AddNamedCommand(addInInstance, "CommandName", "My ...
    (microsoft.public.vsnet.ide)
  • Re: Export to HTML by code
    ... The DoCmd code will invoke the UI command and will automatically display the dialog. ... Public Sub SaveAsWeb ...
    (microsoft.public.visio.developer)
  • Re: Export to HTML by code
    ... The DoCmd code will invoke the UI command and will automatically display the ... Public Sub SaveAsWeb ...
    (microsoft.public.visio.developer)
  • Re: Problem with command button
    ... Greg Maxey/Word MVP ... juan wrote: ... ...and this way I will delete the command button ... Public Sub FilePrintDefault() ...
    (microsoft.public.word.vba.general)