#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. Phillip Pi Excel Discussion (Misc queries) 0 April 23rd 09 08:53 PM
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. Phillip Pi Setting up and Configuration of Excel 0 April 23rd 09 08:53 PM
excel 2003 saved file will not open without a blank workbook open Bob Excel Discussion (Misc queries) 4 November 11th 06 04:24 PM
In Excel - Use Windows Explorer instead of File Open to open file KymY Excel Discussion (Misc queries) 1 August 5th 06 09:59 PM
Open email windows can't open, excel shreadsheet file .xls ? skiz Excel Discussion (Misc queries) 0 October 2nd 05 07:03 PM


All times are GMT +1. The time now is 05:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"