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

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
 
G

Greg Glynn

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
 
D

DVAL

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top