Hola,
My issue is I can't access my 2nd workbook file when I use this code.
This works when app. is on E: drive
Sub DataLoad()
'PURPOSE: This sub apppends Source Information Master File folder with approriate data
'VARIABLE DIMENSION
Dim strRANGE As String 'DATA RANGE
Dim wbkActive As Workbook 'ActiveWorkbook
Dim wsSourceData As Worksheet 'Data worksheet
'VARIABLE SET
Set wbkActive = Application.ActiveWorkbook
Set wsSourceData = wbkActive.Worksheets("SourceData")
strRNG1 = wbkActive.Names("RANGE1").RefersToRange
'MAIN CODE
wsSourceData.Range("A2:J2").Copy 'select the range A2 to J2, thats the data I need
Application.Workbooks.Open ("E:\SOURCEDATAMASTER") ' Open the file to copy to
Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial _
Paste:=xlPasteValues 'find the last row containing data, and then plus one, then paste the data
ActiveWorkbook.Close SaveChanges:=True 'close and save the masterfile workbook
'wbkActive.Activate 'bring the Source Input workbook back to the front
End Sub
When I substitute a different file path the code does not recognize the 2nd workbook.
Application.Workbooks.Open ("I:\SOURCE INSPECTION\SOURCEDATAMASTER")
Any and all help will be appreciated!
Bookmarks