#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 114
Default Sheet Tabs

Hi All

When I run the following macro everything works OK with no problems

Sub Macro7()
'Copies and Saves Result At the End Of Workbook

Application.ScreenUpdating = False
Sheets("Result").Select
Sheets("Result").Copy After:=Sheets(29)
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("Result").Select
Range("A2:J2").Select
Selection.ClearContents
Range("A3:J3").Select
Selection.ClearContents
Range("B5:J24").Select
Selection.ClearContents
Range("A2:J2").Select
Application.ScreenUpdating = True
End Sub

Is it possible to enter Text in Cell "L4" for example London and when the
Result Sheet is copied and moved using the Macro above - the Sheet Tab
changes to the text in "L4"
--
Many thanks

hazel
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Sheet Tabs

Just add

Activesheet.Name = Range("L4").Value

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Hazel" wrote in message
...
Hi All

When I run the following macro everything works OK with no problems

Sub Macro7()
'Copies and Saves Result At the End Of Workbook

Application.ScreenUpdating = False
Sheets("Result").Select
Sheets("Result").Copy After:=Sheets(29)
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("Result").Select
Range("A2:J2").Select
Selection.ClearContents
Range("A3:J3").Select
Selection.ClearContents
Range("B5:J24").Select
Selection.ClearContents
Range("A2:J2").Select
Application.ScreenUpdating = True
End Sub

Is it possible to enter Text in Cell "L4" for example London and when the
Result Sheet is copied and moved using the Macro above - the Sheet Tab
changes to the text in "L4"
--
Many thanks

hazel



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Sheet Tabs

If I understand you, you want to copy resultgo back to the source
sheetclear some rangesname it.

NOT tested. Pay particular attention to the dot placement ( . ) in the
with statement

sub copysht()
Application.ScreenUpdating = False
with Sheets("Result")
.Copy After:=Sheets(29)
.Range("A2:J3,b5:j24").ClearContents
.name=.range("l4")
application goto .Range("A2") 'why?
end with
Application.ScreenUpdating = True
End Sub


--
Don Guillett
SalesAid Software

"Hazel" wrote in message
...
Hi All

When I run the following macro everything works OK with no problems

Sub Macro7()
'Copies and Saves Result At the End Of Workbook

Application.ScreenUpdating = False
Sheets("Result").Select
Sheets("Result").Copy After:=Sheets(29)
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("Result").Select
Range("A2:J2").Select
Selection.ClearContents
Range("A3:J3").Select
Selection.ClearContents
Range("B5:J24").Select
Selection.ClearContents
Range("A2:J2").Select
Application.ScreenUpdating = True
End Sub

Is it possible to enter Text in Cell "L4" for example London and when the
Result Sheet is copied and moved using the Macro above - the Sheet Tab
changes to the text in "L4"
--
Many thanks

hazel



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 114
Default Sheet Tabs

Hi Bob

Thanks been messing about for weeks re - typing Sheet Tab names 40 a week I
won't have to do from now on --- Thanks
--
Many thanks

hazel


"Bob Phillips" wrote:

Just add

Activesheet.Name = Range("L4").Value

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Hazel" wrote in message
...
Hi All

When I run the following macro everything works OK with no problems

Sub Macro7()
'Copies and Saves Result At the End Of Workbook

Application.ScreenUpdating = False
Sheets("Result").Select
Sheets("Result").Copy After:=Sheets(29)
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("Result").Select
Range("A2:J2").Select
Selection.ClearContents
Range("A3:J3").Select
Selection.ClearContents
Range("B5:J24").Select
Selection.ClearContents
Range("A2:J2").Select
Application.ScreenUpdating = True
End Sub

Is it possible to enter Text in Cell "L4" for example London and when the
Result Sheet is copied and moved using the Macro above - the Sheet Tab
changes to the text in "L4"
--
Many thanks

hazel




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
sheet tabs is checked but I can't see my tabs 3091Director Excel Discussion (Misc queries) 2 March 15th 10 03:46 AM
tabs are missing even though 'tools-options-view-sheet tabs' ok? rgranell Excel Worksheet Functions 3 August 16th 08 04:25 PM
How do I change the Excel sheet tab bar to display more sheet tabs Rockie Excel Discussion (Misc queries) 3 August 18th 06 02:29 PM
I want to print out the sheet tabs (sheet names) Sundus Excel Worksheet Functions 3 February 23rd 05 08:34 PM
hide sheet? uncheck sheet tabs? or ??? NetComm888 Excel Programming 1 February 10th 04 04:38 AM


All times are GMT +1. The time now is 07:56 AM.

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

About Us

"It's about Microsoft Excel"