Note that there are some explanatory texts on larger screens.

plurals
  1. POExcel File Copy causing VBA error (run-time error 424: Object Required)
    primarykey
    data
    text
    <p>So I'm working on a program to take in data ".txt" format and read certain values and then take those values place them in an outside report that is formatted to a standard document my company uses. Then copy the formatted document and save them in a separate workbook, from both of those, that will be a collective database of the formatted sheets for review or print out later.</p> <p>Obviously I have dumb down this code to just the guts of where my problem is occurring but it still represents what my basic idea is and causing the same alarm as the larger file.</p> <pre><code>Sub Begin() Workbooks.Open Filename:="C:\Users\CNCLathe.MANDA\Desktop\XL\COPYING\Report1.xlsx" Workbooks.Open Filename:="C:\Users\CNCLathe.MANDA\Desktop\XL\COPYING\Report2.xlsx" '--------------------------------------------------------------------------------- 'The File With the Sub Program organizing information Set W1 = Workbooks("TEST.xlsm") 'The File With the Formatted Worksheet 'Changes will not be saved when it closes Set W2 = Workbooks("Report1.xlsx") 'The File with all the new formatted worksheets added to it Set W3 = Workbooks("Report2.xlsx") '--------------------------------------------------------------------------------- 'pretending to add data to formatted file as I will later W2.Sheets("Sheet1").Cells(2, 2).Value = 999 'then I need to copy the formated worksheet[as values] 'and add it to Report2 'Error Occurs here W2.Sheets("Sheet1").Copy After:=W1.Sheets(wb.Sheets.Count) 'ActiveSheet.UsedRange.Value = ActiveSheet.UsedRange.Value Workbooks("Report1.xlsx").Activate MsgBox ("OPEN") 'ActiveWorkbook.Save ActiveWorkbook.Close SaveChanges:=False End Sub </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload