my original plan was to copy from a merged & centered range of A1:AG5 into the same size in the second book to no available with various cut and paste options.
After doing more reading and following others I have almost got it after tryingdifferent copy and paste options. Copy from a specified Workbook range (A1:A5), these are text values. Paste into active workbook which could be of any name to the range of (A35:A39).
Error pop up
Run-time error 1004, PasteSpecial Method of Range class failed.
Cells A1, A2, A3, A4 and A5 each has a text sentence which copies and pastes to A35, A36, A37,A38 and A39.
I can run the script and the error box pops up, click END and run the macro button again and the end result meets my requiremnts with the 5 rows having text copied from another book from A to AG with text centered across horizontally,
Option Explicit
Private Sub UpdateForm1_Click()
'Dim wsActive As Worksheet
'Set wsActive = ThisWorkbook.ActiveSheet
Dim wbActive As Workbook
Set wbActive = ThisWorkbook
Dim Up_Location As String
Dim Up_Name As String
Up_Location = "T:\Repeats\"
Up_Name = "PNL_UPDATE.xlsx"
Application.ScreenUpdating = False
Workbooks.Open Up_Location & Up_Name
Worksheets("Sheet1").Activate
ActiveSheet.Range("Text_1").Select
ActiveSheet.Range("Text_1").Copy
wbActive.Sheets("CustQuote").Unprotect Password:="1234"
wbActive.Worksheets("CustQuote").Activate
wbActive.Worksheets("CustQuote").Range("A35:A39").Select
wbActive.Worksheets("CustQuote").Range("A35:A39").PasteSpecial xlPasteAll
Range("A35:AG39").Select
With Selection
.HorizontalAlignment = xlCenterAcrossSelection
.VerticalAlignment = xlCenter
.ReadingOrder = xlContext
End With
Range("E2").Select
wbActive.Sheets("CustQuote").Protect Password:="1234"
Application.CutCopyMode = False
Windows("PNL_UPDATE.xlsx").Activate
ActiveWorkbook.Close
Application.ScreenUpdating = True
End Sub