Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Open excel file, enter values, save & close

I would like to write a macro that will open a designated excel file, (really
doesn't have to open it visibly, I just need to be able to insert items in
the next empy row) Order Form.xls, find the first empty row, insert values in
certain cells in that row based on values from the excel file that called the
macro, save the Order Form.xls file, close (if opened) and return to the
original excel worksheet. I have a function currently that does something
similar into an access file. Are the methods similar?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Open excel file, enter values, save & close

Do you mean this
http://www.rondebruin.nl/copy1.htm

See the example
"Example If the Database sheet is in another workbook"

--
Regards Ron de Bruin
http://www.rondebruin.nl



"JCanyoneer" wrote in message ...
I would like to write a macro that will open a designated excel file, (really
doesn't have to open it visibly, I just need to be able to insert items in
the next empy row) Order Form.xls, find the first empty row, insert values in
certain cells in that row based on values from the excel file that called the
macro, save the Order Form.xls file, close (if opened) and return to the
original excel worksheet. I have a function currently that does something
similar into an access file. Are the methods similar?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Open excel file, enter values, save & close

Not really,
I have a workbook open (call it OrderForm1). On Sheet 1 of this work book
I would like to have a button which will run code to:
Open c:\Tracker.xls
Put the value of cell B5 from Order1 in cell A2 on Tracker
Save the Tracker file
Close the Tracker file

I have written code but it doesn't work. I am doing this with mutiple cells
so the code is fairly long but the above gives the jist of what I'm trying to
do.
Both files are excel, one is currently open and the other is not.

"Ron de Bruin" wrote:

Do you mean this
http://www.rondebruin.nl/copy1.htm

See the example
"Example If the Database sheet is in another workbook"

--
Regards Ron de Bruin
http://www.rondebruin.nl



"JCanyoneer" wrote in message ...
I would like to write a macro that will open a designated excel file, (really
doesn't have to open it visibly, I just need to be able to insert items in
the next empy row) Order Form.xls, find the first empty row, insert values in
certain cells in that row based on values from the excel file that called the
macro, save the Order Form.xls file, close (if opened) and return to the
original excel worksheet. I have a function currently that does something
similar into an access file. Are the methods similar?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Open excel file, enter values, save & close

Hi JCanyoneer

My example is doing this
What have you try ?


--
Regards Ron de Bruin
http://www.rondebruin.nl



"JCanyoneer" wrote in message ...
Not really,
I have a workbook open (call it OrderForm1). On Sheet 1 of this work book
I would like to have a button which will run code to:
Open c:\Tracker.xls
Put the value of cell B5 from Order1 in cell A2 on Tracker
Save the Tracker file
Close the Tracker file

I have written code but it doesn't work. I am doing this with mutiple cells
so the code is fairly long but the above gives the jist of what I'm trying to
do.
Both files are excel, one is currently open and the other is not.

"Ron de Bruin" wrote:

Do you mean this
http://www.rondebruin.nl/copy1.htm

See the example
"Example If the Database sheet is in another workbook"

--
Regards Ron de Bruin
http://www.rondebruin.nl



"JCanyoneer" wrote in message ...
I would like to write a macro that will open a designated excel file, (really
doesn't have to open it visibly, I just need to be able to insert items in
the next empy row) Order Form.xls, find the first empty row, insert values in
certain cells in that row based on values from the excel file that called the
macro, save the Order Form.xls file, close (if opened) and return to the
original excel worksheet. I have a function currently that does something
similar into an access file. Are the methods similar?






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Open excel file, enter values, save & close

It works perfect. Sorry, I just opend the link without reading which part you
suggested I look at. I was also looking for ADO code (just to make it similar
to database access I am currently using), so I just skimmed the link. Played
with it this morning and it all works awesome. Thank you!

"Ron de Bruin" wrote:

Hi JCanyoneer

My example is doing this
What have you try ?


--
Regards Ron de Bruin
http://www.rondebruin.nl



"JCanyoneer" wrote in message ...
Not really,
I have a workbook open (call it OrderForm1). On Sheet 1 of this work book
I would like to have a button which will run code to:
Open c:\Tracker.xls
Put the value of cell B5 from Order1 in cell A2 on Tracker
Save the Tracker file
Close the Tracker file

I have written code but it doesn't work. I am doing this with mutiple cells
so the code is fairly long but the above gives the jist of what I'm trying to
do.
Both files are excel, one is currently open and the other is not.

"Ron de Bruin" wrote:

Do you mean this
http://www.rondebruin.nl/copy1.htm

See the example
"Example If the Database sheet is in another workbook"

--
Regards Ron de Bruin
http://www.rondebruin.nl



"JCanyoneer" wrote in message ...
I would like to write a macro that will open a designated excel file, (really
doesn't have to open it visibly, I just need to be able to insert items in
the next empy row) Order Form.xls, find the first empty row, insert values in
certain cells in that row based on values from the excel file that called the
macro, save the Order Form.xls file, close (if opened) and return to the
original excel worksheet. I have a function currently that does something
similar into an access file. Are the methods similar?








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Open excel file, enter values, save & close

Thanks for the feedback



--
Regards Ron de Bruin
http://www.rondebruin.nl



"JCanyoneer" wrote in message ...
It works perfect. Sorry, I just opend the link without reading which part you
suggested I look at. I was also looking for ADO code (just to make it similar
to database access I am currently using), so I just skimmed the link. Played
with it this morning and it all works awesome. Thank you!

"Ron de Bruin" wrote:

Hi JCanyoneer

My example is doing this
What have you try ?


--
Regards Ron de Bruin
http://www.rondebruin.nl



"JCanyoneer" wrote in message ...
Not really,
I have a workbook open (call it OrderForm1). On Sheet 1 of this work book
I would like to have a button which will run code to:
Open c:\Tracker.xls
Put the value of cell B5 from Order1 in cell A2 on Tracker
Save the Tracker file
Close the Tracker file

I have written code but it doesn't work. I am doing this with mutiple cells
so the code is fairly long but the above gives the jist of what I'm trying to
do.
Both files are excel, one is currently open and the other is not.

"Ron de Bruin" wrote:

Do you mean this
http://www.rondebruin.nl/copy1.htm

See the example
"Example If the Database sheet is in another workbook"

--
Regards Ron de Bruin
http://www.rondebruin.nl



"JCanyoneer" wrote in message
...
I would like to write a macro that will open a designated excel file, (really
doesn't have to open it visibly, I just need to be able to insert items in
the next empy row) Order Form.xls, find the first empty row, insert values in
certain cells in that row based on values from the excel file that called the
macro, save the Order Form.xls file, close (if opened) and return to the
original excel worksheet. I have a function currently that does something
similar into an access file. Are the methods similar?








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
Open, Save and close Excel 2007 file with a cmd command Hugo Pinto Excel Discussion (Misc queries) 5 March 3rd 08 10:05 PM
Each time I close an Excel file, it asks if I want to save. Doug Bell Excel Discussion (Misc queries) 4 July 24th 07 07:44 PM
File close excel does not ask me to save changes Cathy Humphreys Excel Discussion (Misc queries) 2 June 13th 05 08:48 PM
I can't save a file unless I close all excel instances or it's th. BVBOWES Excel Discussion (Misc queries) 0 April 26th 05 09:20 PM
Automate open file, update links, run macro, close and save file Geoff[_7_] Excel Programming 2 August 26th 03 10:13 PM


All times are GMT +1. The time now is 09:56 AM.

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

About Us

"It's about Microsoft Excel"