Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default selecting current row information and transfering it.

I have one workbook sheet with a price list and associated dat in rows. I
need to be able to double click or similar on a cell containeing the pirce of
a particular model have this action select all the associated data in that
row and enter this detail in a series of cells in another workbook/worksheet.

Any suggestions on how to code this please?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default selecting current row information and transfering it.

right click on the tab of the sheet with the data, select view code, thenput
in data like this:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Set rng = Workbooks("Mybook2.xls") _
.Worksheets("Sheet1").Cells(Rows.Count, 1).End(xlUp)(2)
Target.EntireRow.Copy rng
Cancel = True
End Sub

The challenge is how to communicate which workbook/cell to copy the
information to.

You haven't provided enough information to determine that.

--
Regards,
Tom Ogilvy

"Alan M" wrote in message
...
I have one workbook sheet with a price list and associated dat in rows. I
need to be able to double click or similar on a cell containeing the pirce

of
a particular model have this action select all the associated data in that
row and enter this detail in a series of cells in another

workbook/worksheet.

Any suggestions on how to code this please?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default selecting current row information and transfering it.

Hi Tom,
Sorry need some more help on this one!

The sorce data is in workbook ("Pricing.xls").Worksheet("List") . The
complete row of data needs to be copied from here. and then the the target
workbook is called Offer.xls and the worksheet is "Offer page". The cells in
the row must be added to a number of non-adjacent cells. e.g.

Row double clicked in Pricing.xls. List is paster as follows.

cell 1 in row to cell B6 in ("Offer.xls").(" Offer page")

cell3 in row to cell B10 on ("Offer.xls").(" Offer page")

Hope this makes sense

"Tom Ogilvy" wrote:

right click on the tab of the sheet with the data, select view code, thenput
in data like this:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Set rng = Workbooks("Mybook2.xls") _
.Worksheets("Sheet1").Cells(Rows.Count, 1).End(xlUp)(2)
Target.EntireRow.Copy rng
Cancel = True
End Sub

The challenge is how to communicate which workbook/cell to copy the
information to.

You haven't provided enough information to determine that.

--
Regards,
Tom Ogilvy

"Alan M" wrote in message
...
I have one workbook sheet with a price list and associated dat in rows. I
need to be able to double click or similar on a cell containeing the pirce

of
a particular model have this action select all the associated data in that
row and enter this detail in a series of cells in another

workbook/worksheet.

Any suggestions on how to code this please?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default selecting current row information and transfering it.

Code goes in [Pricing.xls]List code module

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
dim rng as Range, rng1 as Range
Set rng = Workbooks("Offer.xls") _
.Worksheets("Offer page").Range("B6")
Set rng1 = Workbooks("Offer.xls") _
.Worksheets("Offer page").Range("B10")
rng.Value = Cells(target.row,1).Value
rng1.Value = cells(Target.row,3).Value

Cancel = True
End Sub

--
Regards,
Tom Ogilvy


"Alan M" wrote in message
...
Hi Tom,
Sorry need some more help on this one!

The sorce data is in workbook ("Pricing.xls").Worksheet("List") . The
complete row of data needs to be copied from here. and then the the target
workbook is called Offer.xls and the worksheet is "Offer page". The cells

in
the row must be added to a number of non-adjacent cells. e.g.

Row double clicked in Pricing.xls. List is paster as follows.

cell 1 in row to cell B6 in ("Offer.xls").(" Offer page")

cell3 in row to cell B10 on ("Offer.xls").(" Offer page")

Hope this makes sense

"Tom Ogilvy" wrote:

right click on the tab of the sheet with the data, select view code,

thenput
in data like this:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Set rng = Workbooks("Mybook2.xls") _
.Worksheets("Sheet1").Cells(Rows.Count, 1).End(xlUp)(2)
Target.EntireRow.Copy rng
Cancel = True
End Sub

The challenge is how to communicate which workbook/cell to copy the
information to.

You haven't provided enough information to determine that.

--
Regards,
Tom Ogilvy

"Alan M" wrote in message
...
I have one workbook sheet with a price list and associated dat in

rows. I
need to be able to double click or similar on a cell containeing the

pirce
of
a particular model have this action select all the associated data in

that
row and enter this detail in a series of cells in another

workbook/worksheet.

Any suggestions on how to code this please?






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
Transfering information form one cell to another work sheet Stephanie Excel Worksheet Functions 11 September 25th 09 12:56 AM
transfering information minimoi Excel Worksheet Functions 0 March 9th 09 11:49 PM
Transfering Information Chrissie New Users to Excel 1 October 31st 08 05:56 AM
transfering information from one cell to another garr Excel Worksheet Functions 8 February 21st 05 01:28 AM
Transfering information to the next free cell in a column Chaudfeu Excel Discussion (Misc queries) 1 February 19th 05 07:18 PM


All times are GMT +1. The time now is 09:41 PM.

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"