I have a workbook that contains a database .
On that database there is a certain row of data that i would like to copy and paste to all sheets.
The copying ra
Dim Rng As Range, _
Inp As Range, _
wS As Worksheet
Set Inp = Selection
Inp.Interior.ColorIndex = 37
On Error Resume Next
Set Rng = Application.InputBox("Copy to", Type:=8)
On Error GoTo 0
If TypeName(Rng) <> "Range" Then
MsgBox "Cancelled", vbInformation
Exit Sub
Else
Rng.Parent.Activate
Inp.Copy
For Each wS In ActiveWorkbook.Worksheets
wS.Range("B1").Paste Link:=True
Next
End If
Application.CutCopyMode = 0
do you need a Loop for all worksheets ?
Dim ws as Worksheet
For Each ws in ActiveWorkbook.Worksheets
If Not ws.Name = "*Name of the database workbook *" Then
Call ws.Range("B1:N1").PasteSpecial(xlPasteAll, xlPasteSpecialOperationNone)
End If
Next