|
-
September 6th, 2001, 07:15 AM
#1
VBA Excel question ???
is it possible to affect a specific cell value to the name of its worksheet ?
Make it with rocker style \w/
-
September 6th, 2001, 07:18 AM
#2
Re: VBA Excel question ???
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
-
September 6th, 2001, 07:31 AM
#3
Re: VBA Excel question ???
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/
-
September 6th, 2001, 07:52 AM
#4
Re: VBA Excel question ???
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
-
September 6th, 2001, 08:50 AM
#5
Re: VBA Excel question ???
yeah,
that's exactly what I wanted to do.
thanks, :O)
Make it with rocker style \w/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|