Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I disable automatic chart creation in Excel? | Charts and Charting in Excel | |||
how to disable chart tab in Excel? | Excel Programming | |||
How can I disable Help in Excel (especially the <F1 key)? | Excel Discussion (Misc queries) | |||
Disable resize Waterfall chart | Charts and Charting in Excel | |||
Disable AutoSize for all fonts in chart? | Charts and Charting in Excel |