Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default How to: copy value from active sheet to all other sheets with VBA (in desired cell)

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default How to: copy value from active sheet to all other sheets with VBA(in desired cell)

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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default How to: copy value from active sheet to all other sheets with VBA (in desired cell)

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!


"Greg Glynn" wrote in message
...
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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default How to: copy value from active sheet to all other sheets with VBA (in desired cell)

See added line of code below

On Tue, 14 Dec 2010 23:46:11 +0100, "DVAL" wrote:

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

ws.select
Range("D10").Select
ActiveSheet.Paste

Next wSheet
End Sub


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro to find cell content in sheets and make sheet active Nigel Excel Discussion (Misc queries) 4 June 26th 14 02:38 PM
Active Cell Copy And Paste Sheet to Sheet A.R.J Allan Jefferys New Users to Excel 4 May 4th 06 02:04 AM
wud like 2 open the w.book of 12 sheets with my desired sheet? Shariq Excel Worksheet Functions 1 March 13th 06 04:48 AM
Copy from active sheet and paste into new sheet using info from cell in active Ingve Excel Programming 3 January 23rd 06 09:57 PM
To copy from a range in another sheet to the active cell raja Excel Programming 1 September 8th 05 04:47 PM


All times are GMT +1. The time now is 06:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"