It feels like this should be super simple but I have tried like 5 different things and it still won't work. It's likely I am just missing something completely obvious to try .
I am trying to have dept. W jump from one worksheet to another in same workbook to copy/paste between them once it reviews the data it needs to that was previously placed there.
Dept. W needs to copy a section from one sheet that is pushed from outlook by dept.X and has a default usage region of A2:O50 and just paste that list unto another worksheet that has a running list already started for the month that is controlled by dept Y.
I want to use VBA via a pushbutton because there are dozen's of worksheet pages and the pages are password controlled so not everyone "sees" all the pages. Regardless if I do F8 and step through the code it works fine until it actually needs to paste all the potentially copied rows. If gives an error message instead of pasting data. Any suggestions appreciated. Thanks in advance!
Sub ConvertData()
'takes data + adds to "Worksheet1" running page
Worksheets("Worksheet2").Activate
Application.ScreenUpdating = True 'need to turn false back on once section coded in complete
'Error message if no data there to upload
If [A2] = "" Then
MsgBox "Program ended: There is not currently any new data in file to upload."
Exit Sub
End If
'define future range variable
Dim rngLastRow As Range
'Copy Reviewed data entered onto pg
ActiveSheet.[A2:O50].Select
Selection.Copy
'switch to Monthly Data sheet and find first blank row
Worksheets("Worksheet1").Activate
If [H5] = "" Then ActiveSheet.[H5].Select
If [H5] <> "" Then
Set rngLastRow = ActiveSheet.[H5].End(xlDown).Offset(1, 0)
' rngLastRow.Select
End If
rngLstRow.Offset(1, 0).Paste
Bookmarks