Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default copy non-coun. cell

You can put some code in the ThisWorkbook module to do anything you
want. You can either write the the full code here or call a regular macro.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
* your code*
End Sub


--
sb
"sd" wrote in message
...
thanks for reply

what i want is when i print a invoice at that time only i
want that data into register.
is any more help for macro?
Thanks

-----Original Message-----
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.


.



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
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing Options Yuvraj Excel Discussion (Misc queries) 0 June 29th 09 11:20 AM
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing Yuvraj Excel Discussion (Misc queries) 0 June 26th 09 06:01 PM
How can I copy a value from a cell and paste it into another cell while adding it to the previous value in that cell [email protected] Excel Worksheet Functions 2 November 7th 07 09:39 AM
I copy a formula and the results copy from the original cell brooklynsd Excel Discussion (Misc queries) 1 June 23rd 07 01:35 AM
coun if thanks Excel Worksheet Functions 1 April 14th 05 10:27 PM


All times are GMT +1. The time now is 12:12 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"