Thread: Recall a file
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dennis Tucker Dennis Tucker is offline
external usenet poster
 
Posts: 140
Default Recall a file

Thanks. There are a few parts to your solution.

1. Reading the address of the selected cell(in the database file). This
tells you how to get the right filename. Use "ActiveCell.Address"
2. Open the Quote file. Use the recorder for this and use a variable for
the filename.
3. Open the MasterQuote file. Use the recorder for this.
4. Copy the data over. Like this...

Workbooks("MasterQuote.xls").Worksheets("Sheet1"). Range("A1").Value=Workbooks("Quote1234.xls").Works heets("Sheet1").Range("A1").Value



"oldjay" wrote in message
...
If a Quote number has been selected means - After a Quote is saved and
certain information has been exported to the database. It has 4 fields
Date, Description of the quote, Name of the person making the Quote and
the
Quote Number which is the file name of the saved quote.
If someone wants to review this quote he normally would open MasterQuote
and recall the saved quote number file This file would re-populate various
cells in MasterQuote to re-create the original quote. What I want to do is
if
a person is looking in the database for the quote file number all he has
to
do is select the cell having the quote number and click the command button
that will automatically open MasterQuote and import the necessary
information.

"Dennis Tucker" wrote:

What do you mean by

....if a Quote number has been selected ... ??



"oldjay" wrote in message
...
I have a file named MasterQuote. A salesman can open it and then insert
inputs to generate a quote. He then clicks a command button that saves
the
inputs to a file named Quotes(varies with the quote). Also a record is
exported to a file Quotes Database.xls that has the quote number, date
and
description.

I want a command button in Quotes Database that when clicked will check
to
see if a Quote number has been selected and if so checks to see if
MasterQuote is open and if not opens it then executes the macro
RecallQuote.

oldjay


.