Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using a script downloaded from a web page the code
below is missing out my charts from the list of results due to the skip empty sheets part. Please can someone tell me how to take it out so the charts are part of the list! Thanks ' Add the checkboxes TopPos = 40 For i = 1 To ActiveWorkbook.Worksheets.Count Set CurrentSheet = ActiveWorkbook.Worksheets(i) ' Skip empty sheets and hidden sheets If Application.CountA(CurrentSheet.Cells) < 0 And _ CurrentSheet.Visible Then SheetCount = SheetCount + 1 PrintDlg.CheckBoxes.Add 78, TopPos, 150, 16.5 PrintDlg.CheckBoxes(SheetCount).Text = _ CurrentSheet.Name TopPos = TopPos + 13 End If Next i ' Move the OK and Cancel buttons PrintDlg.Buttons.Left = 240 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can you restate or explain what you mean by:
"the code below is missing out my charts from the list of results due to the skip empty sheets part." "Rob" wrote: I am using a script downloaded from a web page the code below is missing out my charts from the list of results due to the skip empty sheets part. Please can someone tell me how to take it out so the charts are part of the list! Thanks ' Add the checkboxes TopPos = 40 For i = 1 To ActiveWorkbook.Worksheets.Count Set CurrentSheet = ActiveWorkbook.Worksheets(i) ' Skip empty sheets and hidden sheets If Application.CountA(CurrentSheet.Cells) < 0 And _ CurrentSheet.Visible Then SheetCount = SheetCount + 1 PrintDlg.CheckBoxes.Add 78, TopPos, 150, 16.5 PrintDlg.CheckBoxes(SheetCount).Text = _ CurrentSheet.Name TopPos = TopPos + 13 End If Next i ' Move the OK and Cancel buttons PrintDlg.Buttons.Left = 240 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I believe he means that if his sheet contains only charts, then the line:
If Application.CountA(CurrentSheet.Cells) < 0 considers it to be "empty" and does not make a checkbox for that sheet. I would think he should add another test for Objects.Count <0 If Application.CountA(CurrentSheet.Cells) < 0 _ And CurrentSheet.Objects.count <0 _ And CurrentSheet.Visible Then .... 'make checkboxes End If Mike F "gocush" /delete wrote in message ... Can you restate or explain what you mean by: "the code below is missing out my charts from the list of results due to the skip empty sheets part." "Rob" wrote: I am using a script downloaded from a web page the code below is missing out my charts from the list of results due to the skip empty sheets part. Please can someone tell me how to take it out so the charts are part of the list! Thanks ' Add the checkboxes TopPos = 40 For i = 1 To ActiveWorkbook.Worksheets.Count Set CurrentSheet = ActiveWorkbook.Worksheets(i) ' Skip empty sheets and hidden sheets If Application.CountA(CurrentSheet.Cells) < 0 And _ CurrentSheet.Visible Then SheetCount = SheetCount + 1 PrintDlg.CheckBoxes.Add 78, TopPos, 150, 16.5 PrintDlg.CheckBoxes(SheetCount).Text = _ CurrentSheet.Name TopPos = TopPos + 13 End If Next i ' Move the OK and Cancel buttons PrintDlg.Buttons.Left = 240 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I want the autofill/drag function to skip empty cells | Excel Discussion (Misc queries) | |||
paste special / skip empty cells doesn't work!? | Excel Worksheet Functions | |||
SKIP EMPTY ROWS FROM IMPORT | Excel Programming | |||
How to skip empty cells while running a macro? | Excel Programming | |||
Skip empty and text cells | Excel Programming |