LauraLewis2151
New Member
- Joined
- Sep 25, 2008
- Messages
- 14
I am using an old Excel macro that someone else wrote. It won't work in Excel 2013 since each file opens in its own window. The spreadsheet uses a VLOOKUP function to find the info it is looking for in each file. The problem is that the macro uses a loop and opens 390 different csv files to pull the needed information into the report. Any suggestions on how I can make the macro work in Excel 2013?
Current Macro:
Sub Open_CSVs()
'
' Open_CSVs Macro
' opens the csv files needed to update the report in the workbook
'
' Keyboard Shortcut: Ctrl+Shift+C
' open csv files so wb can be updated Macro
' modified version where files are just opened as csv's, not saved as excel files.
'
Dim open_me_billing As Object
Dim MyPath As String
MyPath = "C:\Users\laura_lewis\Documents\01-Model-Continuity\SFG monthly & weekly zip pkg processing"
ChDir _
MyPath & "\SFG_Raw_CSV"
Windows("Conty_billing_update_MACRO_WB_2013-10-22.xlsm").Activate '
Application.ScreenUpdating = False
For Each open_me_billing In Range("list_of_AAL_billing_files")
ChDir _
MyPath & "\SFG_Raw_CSV"
Workbooks.Open Filename:=open_me_billing
Next
Application.ScreenUpdating = True
End Sub
Current Macro:
Sub Open_CSVs()
'
' Open_CSVs Macro
' opens the csv files needed to update the report in the workbook
'
' Keyboard Shortcut: Ctrl+Shift+C
' open csv files so wb can be updated Macro
' modified version where files are just opened as csv's, not saved as excel files.
'
Dim open_me_billing As Object
Dim MyPath As String
MyPath = "C:\Users\laura_lewis\Documents\01-Model-Continuity\SFG monthly & weekly zip pkg processing"
ChDir _
MyPath & "\SFG_Raw_CSV"
Windows("Conty_billing_update_MACRO_WB_2013-10-22.xlsm").Activate '
Application.ScreenUpdating = False
For Each open_me_billing In Range("list_of_AAL_billing_files")
ChDir _
MyPath & "\SFG_Raw_CSV"
Workbooks.Open Filename:=open_me_billing
Next
Application.ScreenUpdating = True
End Sub