|
▼SkyFuture さん:
>シート1からでもシート2からでも・・・
>ある表題を入力すると他のシートの同じセル位置にその表題が出るようにするには
>Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
>If Intersect(Target, Range("A1")) Is Nothing Then Exit Sub
>Dim stG As String, i As Long
>With ActiveSheet
> stG = .Cells(1, 1).Value
> For i = 1 To ThisWorkbook.Sheets.Count
> Sheets(i).Cells(1, 1) = stG
> Next i
>End With
>End Sub
試してませんが、2カ所変更してみましたがこれでどうですか?
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Intersect(Target, Sh.Range("A1")) Is Nothing Then Exit Sub
Dim stG As String, i As Long
stG = Target.Value
For i = 1 To ThisWorkbook.Sheets.Count
Sheets(i).Cells(1, 1).Value = stG
Next i
End Sub
|
|