Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default SOLVED: Copy sheet name to same cell on each sheet, 50 sheets;run code on any worhseet beforedoubleclick

On 4/3/2016 5:45 PM, GS wrote:
Perhaps simply...

Sub Insert_Sheetname()
Dim n&
On Error GoTo errorhandler
For n = 1 To ActiveWorkbook.Sheets.Count
With Sheets(n).Range("A5")
.Value = Sheets(n).Name: .Font.Bold = True: .Font.Size = 12
End With
Next

NormalExit:
Exit Sub

errorhandler:
MsgBox Err.Number & " " & Err.Description
End Sub

Yes much cleaner, thanks.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unhide sheet, copy and rename new sheets from list, rehide sheet Howard Excel Programming 9 October 12th 13 02:59 PM
How to: copy value from active sheet to all other sheets with VBA (in desired cell) DVAL Excel Programming 3 December 15th 10 01:38 AM
Copy and paste same cell from a number of sheets into a new sheet Oliver Burdekin Excel Programming 3 January 8th 10 06:29 PM
Copy Sheet to new Sheet and clear cells on original sheets Boiler-Todd Excel Discussion (Misc queries) 7 September 23rd 09 10:02 PM
copy and paste from different sheets into one sheet using a VB code reena Excel Programming 2 August 5th 03 02:49 PM


All times are GMT +1. The time now is 10:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"