Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default Enable CommandButton1

Hello,
I have a spreadsheet with a CommandButton1. I have set the Enable
properties to False. I also have a macro in the file I want to use to Enable
the CommandButton1. I'm using the following code:
CommandButton1.Enabled = True
But it's not working to Enable CommandButton1. What have I done wrong?

Thank you so much for your help,
Terri
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Enable CommandButton1


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...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=545719

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Enable CommandButton1

Terri,

Make sure the code you have written resides in the Worksheet code

Dave

"Terri" wrote:

Hello,
I have a spreadsheet with a CommandButton1. I have set the Enable
properties to False. I also have a macro in the file I want to use to Enable
the CommandButton1. I'm using the following code:
CommandButton1.Enabled = True
But it's not working to Enable CommandButton1. What have I done wrong?

Thank you so much for your help,
Terri

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default Enable CommandButton1

Dave,
It does...it still doesn't change the properties for CommandButton1.
Thank so much for your help,
Terri

"ExcelDave" wrote:

Terri,

Make sure the code you have written resides in the Worksheet code

Dave

"Terri" wrote:

Hello,
I have a spreadsheet with a CommandButton1. I have set the Enable
properties to False. I also have a macro in the file I want to use to Enable
the CommandButton1. I'm using the following code:
CommandButton1.Enabled = True
But it's not working to Enable CommandButton1. What have I done wrong?

Thank you so much for your help,
Terri

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 126
Default Enable CommandButton1

One way

if you deal with commandbutton directly from standard module
code like
sub commandbutton1test
Worksheets("yourname").CommandButton1.Enabled = False
end sub

Worksheets("yourname") is Commandbutton1 reside
so, change "yourname" and run the macro.

if you put CommandButton1.Enabled = False in WorkSheet module, i think
you need write some sub code looks like Worksheet method in Worksheet
module to operate from standard module.

keizi

"Terri" wrote in message
...
Hello,
I have a spreadsheet with a CommandButton1. I have set the Enable
properties to False. I also have a macro in the file I want to use to

Enable
the CommandButton1. I'm using the following code:
CommandButton1.Enabled = True
But it's not working to Enable CommandButton1. What have I done

wrong?

Thank you so much for your help,
Terri


Reply
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
HOW TO DO ENABLE ENABLE THE QUERY PARAMETER BUTTON? CPW Excel Worksheet Functions 1 January 21st 10 06:31 PM
Enable Macros GinaC Excel Discussion (Misc queries) 1 April 17th 09 04:36 PM
Sub CommandButton1 help Monty Excel Worksheet Functions 2 September 21st 07 11:50 AM
Enable Mcros Kalevi New Users to Excel 1 January 16th 07 04:42 PM
How do I label a command button so it doesn't say CommandButton1? [email protected] Excel Discussion (Misc queries) 2 December 10th 05 12:40 AM


All times are GMT +1. The time now is 10:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"