Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default controlformat.enabled failed in excel macro

I have a form with a checkbox(enabled) and a scrollbar(disabled). The
checkbox is assigned to a macro which has the following line of code which is
attempting to enable the scrollbar:

ActiveWorkbook.Sheets(sheetname).Shapes(slidername ).ControlFormat.Enabled

But when executed, I get "Enabled method of Scrollbar class Failed". The
values for sheetname and slidername look OK. Any ideas?
--
Dave Ackmann
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default controlformat.enabled failed in excel macro

If the scrollbar was from the Forms toolbar, I could use:
Worksheets("sheet1").ScrollBars("Scroll bar 1").Enabled = False

If the scrollbar was from the Control toolbox toolbar, I'd use:
Worksheets("Sheet1").OLEObjects("Scrollbar1").Obje ct.Enabled = False

DAACKM wrote:

I have a form with a checkbox(enabled) and a scrollbar(disabled). The
checkbox is assigned to a macro which has the following line of code which is
attempting to enable the scrollbar:

ActiveWorkbook.Sheets(sheetname).Shapes(slidername ).ControlFormat.Enabled

But when executed, I get "Enabled method of Scrollbar class Failed". The
values for sheetname and slidername look OK. Any ideas?
--
Dave Ackmann


--

Dave Peterson
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 Reduce size of Macro Enabled Excel File Janhavi Bhokri Excel Discussion (Misc queries) 1 February 15th 12 08:14 PM
Excel Macro-enabled Workbook Salza Excel Discussion (Misc queries) 2 May 16th 10 03:57 AM
Excel Macro-enabled Worksheet VBA_Newb Excel Discussion (Misc queries) 0 March 10th 10 03:52 PM
macro enabled excel worksheet running very slow. Bill R Excel Discussion (Misc queries) 1 May 21st 09 09:57 PM
ThisWorkbook.Saved = True does not work when Shapes().ControlFormat.Enabled = False Joe HM Excel Programming 0 August 3rd 06 07:46 PM


All times are GMT +1. The time now is 07:38 PM.

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"