KlausW
Active Member
- Joined
- Sep 9, 2020
- Messages
- 453
- Office Version
- 2016
- Platform
- Windows
Hi
I'm using this VBA code to merge multiple sheets into one sheet, but I can't get it to run.
What it has to do is add up all sheets after sheet number 6. In to the sheet Vare.
The area to be combined is from A2:I and until there is no more text.
And it must be inserted in sheet Vare from A2 and down.
Some who can help
Any help will be appreciated
Best regards
Klaus W
I'm using this VBA code to merge multiple sheets into one sheet, but I can't get it to run.
What it has to do is add up all sheets after sheet number 6. In to the sheet Vare.
The area to be combined is from A2:I and until there is no more text.
And it must be inserted in sheet Vare from A2 and down.
Some who can help
Any help will be appreciated
Best regards
Klaus W
VBA Code:
Sub Rektangelafrundedehjørner7_Klik()
'UpdatebyExtendoffice
Dim J As Integer
On Error Resume Next
Sheets(1).Select
'Worksheets.Add
Sheets(1).Name = "Vare"
Sheets(4).Activate
Range("A2:I").EntireRow.Select
Selection.Copy Destination:=Sheets(1).Range("A2")
For J = 4 To Sheets.Count
Sheets(J).Activate
Range("A1:I").Select
Selection.CurrentRegion.Select
Selection.Offset(1, 0).Resize(Selection.Rows.Count - 1).Select
Selection.Copy Destination:=Sheets(1).Range("A65536").End(xlUp)(2)
Next
'Column_Width
End Sub