JohnKauffman
New Member
- Joined
- Nov 1, 2012
- Messages
- 36
Is there a collection that holds all sheets: work- chart- dialog- ?
What would be the DIM datatype of a member? (none of the intellitype options seem to fit)
Also, when I add the use of the dialog() collection VBA says it can't recognize the whole sub()
Tester I am using
Sub CollectionsSheet()
' ? what collection holds all sheets: work-, chart- dialog-
Dim wsSheetCurrent As Worksheet
Dim wsChartCurrent As Chart
Dim dlgDialogCurrent As Dialog
For Each wsSheetCurrent In Worksheets()
MsgBox "Worksheet object in WorkSheets collection: " & Chr(13) & wsSheetCurrent.Name
Next wsSheetCurrent
For Each wsChartCurrent In Charts()
MsgBox "Chart object in Sheets collection: " & Chr(13) & wsChartCurrent.Name
Next wsChartCurrent
' ??? when using dialogs() VBA says entire sub() not recognized
'For Each dlgDialogCurrent In Dialogs()...
' MsgBox dlgDialogCurrent.Name
'Next dlgDialogCurrent
End Sub
What would be the DIM datatype of a member? (none of the intellitype options seem to fit)
Also, when I add the use of the dialog() collection VBA says it can't recognize the whole sub()
Tester I am using
Sub CollectionsSheet()
' ? what collection holds all sheets: work-, chart- dialog-
Dim wsSheetCurrent As Worksheet
Dim wsChartCurrent As Chart
Dim dlgDialogCurrent As Dialog
For Each wsSheetCurrent In Worksheets()
MsgBox "Worksheet object in WorkSheets collection: " & Chr(13) & wsSheetCurrent.Name
Next wsSheetCurrent
For Each wsChartCurrent In Charts()
MsgBox "Chart object in Sheets collection: " & Chr(13) & wsChartCurrent.Name
Next wsChartCurrent
' ??? when using dialogs() VBA says entire sub() not recognized
'For Each dlgDialogCurrent In Dialogs()...
' MsgBox dlgDialogCurrent.Name
'Next dlgDialogCurrent
End Sub