View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
buczacz buczacz is offline
external usenet poster
 
Posts: 19
Default copy non-coun. cell

It seems to me that you've got two issues:

(1) to detect when your printing invoice, and

(2) to copy data from one sheet into another.

I suspect there may be a way to detect the "print" command, as you can
set Excel to recompute the sheet prior to printing, but I don't know how
to accomplish same.

An alternative approach would be to write a macro that then becomes your
"print" command. Early in said macro there would be code to open a
dialog box to ask you if you want to transfer data. If the reply is to
the affirmative, it executes the transfer data code. If the replay is to
the negative, it bypasses the transfer data code.

To copy the data your can use VBA commands something like:

Worksheets("register").Cells(ActiveCell.Row, 1).Value = _
Worksheets("data").Cells(ActiveCell.Row, 4).Value

sd wrote:
I have created a Invoice in Sheet1 with the vlookup
function where i copy address from sheet2. I want to
create a register where i can transfer a data from Sheet1
to Register Sheet Inovice no., Invoice Date, Name of Party
& Grant total. Which i am doing mainually.

Is there any way that when i print invoice it should ask
me that do you want to transfer data into Rgister sheet
with yes & no. If i press yes it should copy data i.e.
from cell a5,d10,a10 & h35 (Invoice No.,Invoice date, name
of party & Grant total) in to register sheet and print
Invoice & if no that it start printing invoice only.

When i print 2nd invoice it should copy into next row of
rgister sheet. Is there any help.

plz help me

Thanks in advance.