Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default how to disable/enable command button(ActiveX) using macro

I have tried to create a macro using recorder to disable/enable command
button (ActiveX) with the following code being created

ActiveSheet.Shapes("CommandButton1").Select

This only results in the command button being selected - with the procedure
of enabling/disabling being "lost". So i tried the following code

ActiveSheet.CommandButton1.Select
CommandButton1.Enabled = False

This presents runtime error message "object required"

What is the "simplest" way to create this macro? (first time user)

Any help much appreciated

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default how to disable/enable command button(ActiveX) using macro

ActiveSheet.CommandButton1.Enabled = False

--
Regards!
Stefi



€˛enahs_naneek€¯ ezt Ć*rta:

I have tried to create a macro using recorder to disable/enable command
button (ActiveX) with the following code being created

ActiveSheet.Shapes("CommandButton1").Select

This only results in the command button being selected - with the procedure
of enabling/disabling being "lost". So i tried the following code

ActiveSheet.CommandButton1.Select
CommandButton1.Enabled = False

This presents runtime error message "object required"

What is the "simplest" way to create this macro? (first time user)

Any help much appreciated

.

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
enable/disable button based on cell value Shoney Excel Discussion (Misc queries) 3 January 9th 08 07:34 PM
Enable Command Button Procedure Kenny Excel Discussion (Misc queries) 1 October 14th 07 03:09 AM
Getting an ActiveX command button to do a spreadsheet function Givvie Excel Worksheet Functions 4 August 28th 07 11:18 AM
Enable Command Button base on UserName Doctorjones_md Links and Linking in Excel 6 April 20th 07 07:16 PM
Enable Command Button After Entering Text mikeg710 New Users to Excel 1 March 29th 07 04:12 PM


All times are GMT +1. The time now is 02:44 AM.

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"