How to: copy value from active sheet to all other sheets with VBA (in desired cell)

  • Thread starter Thread starter DVAL
  • Start date Start date
D

DVAL

Does anybody can help me?
I tried with command button
with macro:

Sub Button1_Click()
'
' Button1_Click Macro
'
Dim ws As Worksheet

Range("C3").Select
Selection.Copy
For Each ws In Worksheets

Range("D10").Select
ActiveSheet.Paste

Next wSheet
End Sub
 
Sub Button1_Click()
'
' Button1_Click Macro
'
Dim ws As Worksheet

MyVal = Range("C3")

For Each ws In Worksheets

ws.Range("C3").Value = MyVal
Next ws

End Sub
 
Thanks a lot!

with little change

Sub Button1_Click()
Dim ws As Worksheet
MyVal = Range("C3")
For Each ws In Worksheets
If Not ws.Name = Sheets(1).Name Then
ws.Range("d7").Value = MyVal
End If
Next ws
End Sub
works gr
works great!
 
Back
Top