Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open File
First, I would like to thank M.Tomasura for the help with
my first question. creating a macro to close files and to all that take time to help, it is appreciated. I now need help creating a macro to open files. I need a macro to 1. open the "Open Dialog" box 2. insert the file name to be opened (which changes each month) 3. copy data (from same cells each month) 4. Paste data (to same cells each month) 5. close the file that was opened. I am stuck at trying to insert the file name. Workbook 1 has the file name syntax of "ABC Report Mth Yr" or "ABC Jan 04" next month "ABC Feb 04" etc. Workbook 2 named "ABC EOM Jan 04", "ABC EOM Feb 04",etc. So in Jan, Workbook 1 needs a macro that will insert "ABC EOM Jan 04", in the "Name" box of the "Open Dialog" box and open the file. Next month "ABC EOM Feb 04" etc. Any help would be appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open File
Any reason you can't just open the workbook directly?
Workbooks.Open "ABC Feb 04.xls" or Workbooks.Open ActiveWorkbook.Path & _ Application.PathSeparator & "ABC Feb 04.xls" In article , "ronbo" wrote: First, I would like to thank M.Tomasura for the help with my first question. creating a macro to close files and to all that take time to help, it is appreciated. I now need help creating a macro to open files. I need a macro to 1. open the "Open Dialog" box 2. insert the file name to be opened (which changes each month) 3. copy data (from same cells each month) 4. Paste data (to same cells each month) 5. close the file that was opened. I am stuck at trying to insert the file name. Workbook 1 has the file name syntax of "ABC Report Mth Yr" or "ABC Jan 04" next month "ABC Feb 04" etc. Workbook 2 named "ABC EOM Jan 04", "ABC EOM Feb 04",etc. So in Jan, Workbook 1 needs a macro that will insert "ABC EOM Jan 04", in the "Name" box of the "Open Dialog" box and open the file. Next month "ABC EOM Feb 04" etc. Any help would be appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. | Excel Discussion (Misc queries) | |||
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. | Setting up and Configuration of Excel | |||
excel 2003 saved file will not open without a blank workbook open | Excel Discussion (Misc queries) | |||
In Excel - Use Windows Explorer instead of File Open to open file | Excel Discussion (Misc queries) | |||
Open email windows can't open, excel shreadsheet file .xls ? | Excel Discussion (Misc queries) |