Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default how to disable chart tab in Excel?


Hello all,

I'm have an active sheet with data in it. Also, there is a chart1 tab
which let user to see the graph of calculated data. How can I enable
and disable the chart tab in lower-left part of the screen?
It must be disable as long as the sheet is not puplated with data.

Thanks,
amit

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default how to disable chart tab in Excel?

Amit.

Try this on the code for the worksheet where the datatable is.

Change the constants at the start of the code for your requirments.

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
'assume data table in A2:B4
Const cszRange As String = "A2:B4"
Const cszChart As String = "Chart1"

Dim rCells As Range
Dim lCellsNr As Long

Set rCells = Me.Range(cszRange)
lCellsNr = rCells.Cells.Count

If Not (Intersect(Target, rCells) Is Nothing) Then
Charts(cszChart).Visible = _
WorksheetFunction.CountBlank(rCells) < lCellsNr
End If
Set rCells = Nothing ' not really needed but better here.
End Sub


--
Hope this helps
Martin Fishlock
Please do not forget to rate this reply.


"Amit" wrote:


Hello all,

I'm have an active sheet with data in it. Also, there is a chart1 tab
which let user to see the graph of calculated data. How can I enable
and disable the chart tab in lower-left part of the screen?
It must be disable as long as the sheet is not puplated with data.

Thanks,
amit


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 do I disable automatic chart creation in Excel? Huang Charts and Charting in Excel 1 November 12th 09 11:02 PM
how to disable chart tab in Excel? Amit Excel Programming 0 December 19th 06 02:27 AM
How can I disable Help in Excel (especially the <F1 key)? sonic_d_hog Excel Discussion (Misc queries) 1 February 17th 06 10:01 PM
Disable resize Waterfall chart Tim Charts and Charting in Excel 4 October 4th 05 10:46 PM
Disable AutoSize for all fonts in chart? Ed Charts and Charting in Excel 2 May 12th 05 06:01 PM


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