Prev: Private Sub Workbook
Next: Geometric progression in VBA
From: terilad on 7 May 2010 13:26 Hi, How can I write this code to place in the workbook of the file, the macro changes the sheet tab name as per the individual sheet cell A1 which is changed from the first sheet Index of Stock, I am looking to do this so it changes instantly when the name is changed and do not need to calculate each sheet, I have over 100 sheets. Here is the macro Private Sub Worksheet_Calculate() With Me.Range("A1") If .Value <> "" Then Me.Name = .Value End If End With End Sub Many thanks Mark
From: Don Guillett on 7 May 2010 13:30 Pls do NOT repost. See ans in previous thread. GEEZZZZZZZZZZZ -- Don Guillett Microsoft MVP Excel SalesAid Software dguillett(a)gmail.com "terilad" <terilad(a)discussions.microsoft.com> wrote in message news:B11D556E-9821-470A-B0C5-6C265D3227FB(a)microsoft.com... > Hi, > > How can I write this code to place in the workbook of the file, the macro > changes the sheet tab name as per the individual sheet cell A1 which is > changed from the first sheet Index of Stock, I am looking to do this so it > changes instantly when the name is changed and do not need to calculate > each > sheet, I have over 100 sheets. > > Here is the macro > > Private Sub Worksheet_Calculate() > With Me.Range("A1") > If .Value <> "" Then > Me.Name = .Value > End If > End With > End Sub > > Many thanks > > Mark
From: terilad on 7 May 2010 14:45 Reason for repost was because programming was not working a short time ago. Mark "Don Guillett" wrote: > Pls do NOT repost. See ans in previous thread. GEEZZZZZZZZZZZ > > -- > Don Guillett > Microsoft MVP Excel > SalesAid Software > dguillett(a)gmail.com > "terilad" <terilad(a)discussions.microsoft.com> wrote in message > news:B11D556E-9821-470A-B0C5-6C265D3227FB(a)microsoft.com... > > Hi, > > > > How can I write this code to place in the workbook of the file, the macro > > changes the sheet tab name as per the individual sheet cell A1 which is > > changed from the first sheet Index of Stock, I am looking to do this so it > > changes instantly when the name is changed and do not need to calculate > > each > > sheet, I have over 100 sheets. > > > > Here is the macro > > > > Private Sub Worksheet_Calculate() > > With Me.Range("A1") > > If .Value <> "" Then > > Me.Name = .Value > > End If > > End With > > End Sub > > > > Many thanks > > > > Mark > > . >
From: Project Mangler on 7 May 2010 15:52 Works perfectly here. "terilad" <terilad(a)discussions.microsoft.com> wrote in message news:5541515C-9018-4AF3-BA79-3B0A291BA6CD(a)microsoft.com... > Reason for repost was because programming was not working a short time ago. > > Mark > > "Don Guillett" wrote: > > > Pls do NOT repost. See ans in previous thread. GEEZZZZZZZZZZZ > > > > -- > > Don Guillett > > Microsoft MVP Excel > > SalesAid Software > > dguillett(a)gmail.com > > "terilad" <terilad(a)discussions.microsoft.com> wrote in message > > news:B11D556E-9821-470A-B0C5-6C265D3227FB(a)microsoft.com... > > > Hi, > > > > > > How can I write this code to place in the workbook of the file, the macro > > > changes the sheet tab name as per the individual sheet cell A1 which is > > > changed from the first sheet Index of Stock, I am looking to do this so it > > > changes instantly when the name is changed and do not need to calculate > > > each > > > sheet, I have over 100 sheets. > > > > > > Here is the macro > > > > > > Private Sub Worksheet_Calculate() > > > With Me.Range("A1") > > > If .Value <> "" Then > > > Me.Name = .Value > > > End If > > > End With > > > End Sub > > > > > > Many thanks > > > > > > Mark > > > > . > >
From: Don Guillett on 7 May 2010 16:00
My solution WAS tested. -- Don Guillett Microsoft MVP Excel SalesAid Software dguillett(a)gmail.com "terilad" <terilad(a)discussions.microsoft.com> wrote in message news:5541515C-9018-4AF3-BA79-3B0A291BA6CD(a)microsoft.com... > Reason for repost was because programming was not working a short time > ago. > > Mark > > "Don Guillett" wrote: > >> Pls do NOT repost. See ans in previous thread. GEEZZZZZZZZZZZ >> >> -- >> Don Guillett >> Microsoft MVP Excel >> SalesAid Software >> dguillett(a)gmail.com >> "terilad" <terilad(a)discussions.microsoft.com> wrote in message >> news:B11D556E-9821-470A-B0C5-6C265D3227FB(a)microsoft.com... >> > Hi, >> > >> > How can I write this code to place in the workbook of the file, the >> > macro >> > changes the sheet tab name as per the individual sheet cell A1 which is >> > changed from the first sheet Index of Stock, I am looking to do this so >> > it >> > changes instantly when the name is changed and do not need to calculate >> > each >> > sheet, I have over 100 sheets. >> > >> > Here is the macro >> > >> > Private Sub Worksheet_Calculate() >> > With Me.Range("A1") >> > If .Value <> "" Then >> > Me.Name = .Value >> > End If >> > End With >> > End Sub >> > >> > Many thanks >> > >> > Mark >> >> . >> |