Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank you, that worked, I knew it would be simple
"Paul B" wrote: Jack, why not just put them together in one, Sub nametab() Dim i As Integer On Error Resume Next For i = 1 To Sheets.Count Sheets(i).Name = Sheets(i).Range("G1").Value Next i With ActiveSheet .PageSetup.CenterFooter = .Range("G1").Text End With On Error GoTo 0 End Sub or like this Sub nametab() Dim i As Integer On Error Resume Next For i = 1 To Sheets.Count Sheets(i).Name = Sheets(i).Range("G1").Value Next i With ActiveSheet .PageSetup.CenterFooter = .Range("G1").Text End With CellInfooter On Error GoTo 0 End Sub Sub CellInfooter() With ActiveSheet .PageSetup.CenterFooter = .Range("G1").Text End With End Sub -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "JackR" wrote in message ... I have the first macro set-up to start when a button is clicked, I would like bothe the macros to run when then button is clicked, any help would be great, not real up on this macro stuff yet. MACRO 1 (triggered by button) Sub nametab() Dim i As Integer On Error Resume Next For i = 1 To Sheets.Count Sheets(i).Name = Sheets(i).Range("G1").Value Next i On Error GoTo 0 End Sub WANT TO ADD THE FOLLOWING TO TRIGGER AT THE SAME TIME Sub CellInfooter() With ActiveSheet .PageSetup.CenterFooter = .Range("G1").Text End With End Sub Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
1 button for 2 macros | Excel Discussion (Misc queries) | |||
Command Button anomalies | Excel Discussion (Misc queries) | |||
sorting with macros | Excel Discussion (Misc queries) | |||
Command Button VBA code | Excel Discussion (Misc queries) | |||
Macro to simply bring up the Find dialogue box?? | Excel Discussion (Misc queries) |