LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default can't figure out this bug

Private Sub viewDS()
With Application.CommandBars.ActionControl
If ActiveWorkbook.Charts("DS SALES$").Visible = xlSheetVisibl
Then
.State = msoButtonUp
'If .State = msoButtonUp Then
ActiveWorkbook.Charts("DS SALES$").Visible
xlSheetVeryHidden
.State = msoButtonUp
ActiveWorkbook.Charts("DS MARGIN$").Visible
xlSheetVeryHidden
.State = msoButtonUp
ActiveWorkbook.Charts("DS Cumm Sales $").Visible
xlSheetVeryHidden
.State = msoButtonUp
ActiveWorkbook.Charts("DS Cumm Marg $").Visible
xlSheetVeryHidden
.State = msoButtonUp
Else
ActiveWorkbook.Charts("DS SALES$").Visible
xlSheetVisible
* .State = msoButtonDown
ActiveWorkbook.Charts("DS MARGIN$").Visible
xlSheetVisible
.State = msoButtonDown
ActiveWorkbook.Charts("DS Cumm Sales $").Visible
xlSheetVisible
.State = msoButtonDown
ActiveWorkbook.Charts("DS Cumm Marg $").Visible
xlSheetVisible
.State = msoButtonDown
End If
End With
End Sub

This snipet of code crashes on the line I have marked with an asterik
It gives me the error Object variable or With block variable not set
I've declared the with at the very top though so I don't understand wh
this is crashing. Can someone help me out

--
Message posted from http://www.ExcelForum.com

 
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 'BLINK' A FIGURE INSTEAD OFF BOLDING THE FIGURE Nad.Engoor Excel Worksheet Functions 3 December 30th 08 03:04 PM
how to figure cjbarron5 Excel Discussion (Misc queries) 2 May 28th 08 02:04 AM
Can anyone me help figure this out?? Beginner Excel Discussion (Misc queries) 3 August 22nd 07 11:26 PM
Can anyone help me figure this out???? PLEASE???!!!??? SuzieinNC Excel Discussion (Misc queries) 3 August 22nd 07 10:16 PM
Still trying to figure it out Robertgn Excel Worksheet Functions 2 December 10th 05 12:44 PM


All times are GMT +1. The time now is 10:02 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"