Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
ActiveSheet.Name = Me.Name 'refer to your sheet if it's not the active
sheet
End Sub
Sheet names are limited to 31 characters, so you may want to do
something like this:
If Len(Me.Name) > 31 Then ActiveSheet.Name = Left(Right(Me.Name,
35), 31)
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.