See: we have a sheet named ‘Help’
oSheet = ThisComponent.Sheets("Help")
'no errors, but it doesn’n return the desired sheet
Can you refer to an object like that?
oSheet = ThisComponent.Sheets.Help
'it works (!) WHY?
E.g.
The instructions are equivalent:
oDlg = CreateUnoDialog(DialogLibraries.getByName(Standard).getByName(HelpDlg))
oDlg = CreateUnoDialog(DialogLibraries.Standard.HelpDlg)
The instructions are not equivalent:
oSheet = ThisComponent.Sheets.getByName("Help")
oSheet = ThisComponent.Sheets("Help") 'no errors, but it doesn'n return the desired sheet
oSheet = ThisComponent.Sheets.Help 'it works (!)
The instructions are equivalent:
oSheet = ThisComponent.Sheets.getByIndex(i)
oSheet = ThisComponent.Sheets(i)