Hi, thanks! The only missing item I had seemed to be completely
irrelevant to me; just shows how much one knows, after all. It was a
missing calendar control. But once I unticked that, sure enough, this
script worked. Go figure <g>.
Thanks!
D
[snip]
I modified the script to this:
************************************************
Sub SheetNames_ListAllSheetNamesIntoABlankSheet()
'
ActiveSheet.Unprotect 'place at the beginning of the code
ActiveWorkbook.Sheets.Add Before:=Worksheets(1)
ActiveSheet.Name = "SHEETNames"
For i = 1 To Sheets.Count
Cells(i, "A") = Sheets(i).Name
Next i
Columns("A:A").EntireColumn.AutoFit
ActiveCell.Offset(1, 0).Select
End Sub
************************************************
It seems to do everything perfectly fine though more testing may
reveal problems, for all I know. But at this point, so far, so good.
The only thing I'd like to add is the instruction to Excel to create a
sheet even if one called "SHEETNames" already exists. This is in case
any of the users accessing this workbook runs the macro not realizing
that one is already there. I think I know how to add a message box
telling user SHEETNames already exists (I'll hunt through my tips
folder; I believe I have something there to do that). But it would
still be handy to have Excel do something like this if the macro is
run, say, 5 times:
SHEETNames
SHEETNames NewCopy 1
SHEETNames NewCopy 2
SHEETNames NewCopy 3
SHEETNames NewCopy 4
I think above naming system is good enough and is self-explanatory
enough that the user should get it <g>.
What can be added to code above to do this, though, pls?
Thanks much in advance.
D