Clayton Michael
New Member
- Joined
- Dec 7, 2011
- Messages
- 6
Hey all,
Hopefully this is an easy fix. I'm trying to pull a contact from every worksheet in a workbook. All the worksheets are formatted the same way. The only snag I'm running into is getting the macro to select from the correct worksheet specifically the following line:
"WkSht.Range("A8").End(xlDown).Select"
Here's the entire script I'm working with right now:
--------------------------------
Sub Pull_Contacts()
Dim WkSht As Worksheet
For Each WkSht In ThisWorkbook.Worksheets
If WkSht.Name <> "Upcoming" Then
WkSht.Range("A8").End(xlDown).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Upcoming").Select
Range("A3").End(xlDown).Offset(1, 3).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End If
Next WkSht
End Sub
-------------------------------------
If anyone can tell me what I'm doing wrong or possibly make suggestions I'd really appreciate it.
Hopefully this is an easy fix. I'm trying to pull a contact from every worksheet in a workbook. All the worksheets are formatted the same way. The only snag I'm running into is getting the macro to select from the correct worksheet specifically the following line:
"WkSht.Range("A8").End(xlDown).Select"
Here's the entire script I'm working with right now:
--------------------------------
Sub Pull_Contacts()
Dim WkSht As Worksheet
For Each WkSht In ThisWorkbook.Worksheets
If WkSht.Name <> "Upcoming" Then
WkSht.Range("A8").End(xlDown).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Upcoming").Select
Range("A3").End(xlDown).Offset(1, 3).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End If
Next WkSht
End Sub
-------------------------------------
If anyone can tell me what I'm doing wrong or possibly make suggestions I'd really appreciate it.