Well this is my very first post! I am really hoping someone has an interest in reading because I really need some help. I have about 20 files e-mail to me every day that need to be:
1. openned - half way done. I have the code to open 1 file but not the other 20, who share the same name except for a
number at the end which is progressive. "formato de inventario 1" then "formato de inventario 2" etc..
2. insert password = chicken - half way done. I get promted to introduce the password but havent been able to have VBA type "chicken".
3. unhide columns B and C - done
4. select range A6:P55 -done
5. Copy information -done
6. Paste in a "Master File" for further processing -done
I am attaching the file that will be used to "centralize" all the information as well as the files we will be copying information from. I am using Excel 2007 on a 64 bit system.
![]()
Sub abrir() ' Opens inventory Application.Workbooks.Open ("C:\Users\Trainee\Desktop\Pruebas_2\Formato de Inventario CAEX.xlsx") 'Deactivates protection Windows("Formato de Inventario CAEX.xlsx").Activate Sheets("Formulario").Select ActiveSheet.Unprotect 'Shows hidden columns Windows("Formato de Inventario CAEX.xlsx").Activate Columns("A:D").Select Range("A2").Activate Selection.EntireColumn.Hidden = False 'Copies information from Inventory sheet Windows("Formato de Inventario CAEX.xlsx").Activate Range("B6:P30").Select Selection.Copy 'Paste information in MEGA sheet Windows("MEGA MEGA 2.xlsm").Activate Sheets("Lista 2").Select Rows("2:2").Select Selection.Insert Shift:=xlDown 'Closes Inventory sheet Windows("Formato de Inventario CAEX.xlsx").Activate Range("A1").Select Application.DisplayAlerts = False ActiveWorkbook.Close Application.DisplayAlerts = True End Sub
Bookmarks