LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sheet names in a macro


Hi All
I studied the posts but cannot seem to find an answer to my problem.

I have a spreadsheet that updates Engineers Job Details. Each Engineer
has his own worksheet. The tabs are all named accordingly for each
engineer.
On a menu page references to these worksheets are hyperlinked.
I also have some blank worksheets named NE3 and NE4 (NE-New Engineer)
ready for when a new Engineer starts.

If I need to change one of the Engineers name or place a new Engineers
name in I have referenced the Hyperlinks to a worksheet called Names so
I only have to update the names in the sheet to update all the
Hyperlinks. ‘So far so good’

Do I have to manual change the tab names? Which leads me to my problem
because I have macros that run 'on open' to sort all some of the
worksheets.
I have each sort for example,
Sub SortJohnRTF()
Application.ScreenUpdating = False
Sheets("JohnRTF").Activate
Range("A3:K299").Select
Selection.Sort Key1:=Range("B3"), Order1:=xlDescending,
Key2:=Range("A3") _
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1,
MatchCase:= _
False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal,
DataOption2 _
:=xlSortNormal
Range("A2").Select
End Sub
I run these sorts on workbook open event.
If I want to change or implement a new name how can I change the names
in the macros.
I have tried to change the code to.
Sub SortSheet52()
Application.ScreenUpdating = False
Sheets("Sheet52").Activate
Range("A3:K299").Select
Selection.Sort Key1:=Range("B3"), Order1:=xlDescending,
Key2:=Range("A3") _
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1,
MatchCase:= _
False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal,
DataOption2 _
:=xlSortNormal
Range("A2").Select
End Sub
But this does not work.
Basically I want to be able to change names without having to go
through every related macro and hyperlink.
Sorry long winded but trying to explain
Bernard


--
bern
------------------------------------------------------------------------
bern's Profile: http://www.excelforum.com/member.php...o&userid=20169
View this thread: http://www.excelforum.com/showthread...hreadid=533158

 
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
Cell names = sheet names Vince Excel Worksheet Functions 9 February 8th 08 03:59 PM
list sheet names vertically below the active cell - need macro. Eddy Stan Excel Worksheet Functions 2 September 28th 07 07:48 PM
Need a macro to include file names in a folder to excel sheet anil Excel Discussion (Misc queries) 0 March 12th 07 09:10 AM
I want to print out the sheet tabs (sheet names) Sundus Excel Worksheet Functions 3 February 23rd 05 08:34 PM
return all worksheet tab names and chart sheet tab names in report - an example DataFreakFromUtah Excel Programming 2 October 6th 04 08:09 PM


All times are GMT +1. The time now is 06:26 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"