Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub macro1()
- Windows("Tool.xlsm").Activate
- Dim j As Integer
- For j = 7 To 18
- Sheets(j).Select
- 'My first thought is to select sheet by index number,
- 'and set the index number as variables, but it doesn't work...
- Range("G38:K38").Select
- Selection.Copy
- Windows("30-Day.xlsm").Activate
- Sheets("SB12").Select
- For k = 17 To 28
- Range("E" & k).Select
- Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
- Next k
- Next j
- End Sub
- Sub macro2()
- Windows("Tool.xlsm").Activate
- If ActiveSheet.Index = Worksheets.Count Then
- Worksheets(1).Select
- Else
- ActiveSheet.Next.Select
- End If
- Range("G38:K38").Select
- Selection.Copy
- Windows("30-Day.xlsm").Activate
- Sheets("SB12").Select
- For k = 17 To 28
- Range("E" & k).Select
- Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
- Next k
- End Sub
Add Comment
Please, Sign In to add comment