Hi Folks,
I need to create a new spreadsheet in the current workbook. My code has successfully reviewed the existing sheets to verify that I will not create a tab name collision, so I have some correctly working code.
This is my problem instruction:
gncSheet = ThisComponent.Sheets.insertNewByName("gnc" & s, ThisComponent.Sheets.Count())
… produces an error: Object not accessible. Invalid use of an Object
I have confirmed that ThisComponent.Sheets.Count()
returns the correct tab count, so I don’t think ThisComponent
or Sheets
is my problem. That leaves insertNewByName
, but, inspite of the complaint, t does, in fact, create a new spreadsheet.
If it is doing the job, why is it complaining? Can anybody see what the problem is?
Thanks for the help,
Chris.