I apologize for the silence, I was away for a couple days...
I tried Chip's suggestion, and it worked the first time. I think I
see why it didn't work for you, though. In an earlier post, you showed
the button's Click code, where you call out the sheet by its tab name
"1":
'Show Task Weights
Sheets("1").Visible = True
Sheets("1").Select
whereas in the code you tried, you're calling it:
Const SHEET_WITH_CHANGE_CELL = "Sheet1" '<<< NAME OF SHEET WITH CELL
Am I correct to assume that the sheet tab of your Sheet1 object is
named "1"?
If so, then trying to index it by "Sheet1" will raise a "Index out of
bounds" error because that tab doesn't exist.
I like Chip's suggestion, because it paves the way for a systematic
approach to your problem: with a loop construct and a little more
code, you can update all the ten class buttons under one procedure
call.
I'd like to correct myself on my first suggestion, though. I think
it's much more robust not to use the address property for ID directly
in the way I showed it originally. A better way could be to use the
Range property:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target = Range("B2") Then
Sheets("Sheet33").CommandButton1.Caption = Target.Value
End If
End Sub
This eliminates the hassle of "$B$2" vs. "B2" comparison failures.
The Target.Address property always returns an absolute address with
the $ signs, whereas Range can take a wider variety of inputs.
An earlier post appeared to work, however I found that when I edited other
cells in the worksheet the commandbutton would be updated, no idea how when I
had specified the target cell
This doesn't make sense. How do you know that the button's caption
got updated with the target cell's text, unless you changed the target
cell's contents (which would trigger the caption change as expected) ?
Cheers,
-Basilisk96