# Revision history [back]

### How to cylce through selected spreadsheets?

I'm trying to cycle through spredsheets using basic. I found the code-snippet below. But how can I cycle through those sheets which are alread selected (e.g. multiple selection, but not those which are unselected)? I found the object SelectedSheetsEnum, but how can I use it? Any ideas?

Best wishes

Ulli

sheets = Thiscomponent.getSheets.createEnumeration
While sheets.hasMoreElements
oSheet = sheets.nextElement()
MsgBox "Next sheet name is " & oSheet.getName
Wend

 2 retagged Alex Kemp 10514 ●14 ●42 ●42 http://etmg.altervista...

### How to cylce through selected spreadsheets?

I'm trying to cycle through spredsheets using basic. I found the code-snippet below. But how can I cycle through those sheets which are alread selected (e.g. multiple selection, but not those which are unselected)? I found the object SelectedSheetsEnum, but how can I use it? Any ideas?

Best wishes

Ulli

sheets = Thiscomponent.getSheets.createEnumeration
While sheets.hasMoreElements
oSheet = sheets.nextElement()
MsgBox "Next sheet name is " & oSheet.getName
Wend