is it possible to affect a specific cell value to the name of its worksheet ?
Make it with rocker style \w/
Printable View
is it possible to affect a specific cell value to the name of its worksheet ?
Make it with rocker style \w/
If you mean you want to affect a cell on a specific worksheet?
' myWorkbook is an object pointing to an excel workbook
myWorkbook.Sheets("The name of my sheet").Range("A1").Value = "Some value"
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
huumm
I want to change the value of the sheet's name with the value of the cell.
For example. my sheets "number1" contains 10 cells (A2, A3, A4, A5, A6,...)
if I change the value of the cell "A2", then, it change the name of the sheets "number2" also..
I want to link these 2 values.
Make it with rocker style \w/
Add this code to the worksheet the cells are on. It will check if one of the cells changes, and then rename the appropriate sheet
private Sub Worksheet_Change(byval Target as Excel.Range)
If Target.Column = 1 then
Select Case Target.Row
Case 2 to 10
ThisWorkbook.Sheets(Target.Row).Name = Target.Value
End Select
End If
End Sub
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
yeah,
that's exactly what I wanted to do.
thanks, :O)
Make it with rocker style \w/