Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Transposing a rng selected from a listbox

Hi there,

I need some more help transposing the following the following: I'v
pasted the whole part so you can see how i am getting my info:

Set rng = Range(progListBox.RowSource).Columns(1).Cells
cl = rng.Offset(progListBox.ListIndex, 0).Row
With Workbooks("bonddb.xls").Worksheets("database")

Load:
Range("Issr") = .Cells(cl, 1)
Range("Issr_local") = .Cells(cl, 2)
Range("Principal") = .Cells(cl, 4)
Range("Term") = .Cells(cl, 7)

*** .Columns("EE:GL").Rows(cl).Copy _

Destination:=Workbooks("bsapp_v2.xls").Worksheets( "bsmain").Rows(33).Columns("C"
***

End With

*** is the code that i need to transposed from a row to a column whe
it is pasted. I have tried many different combos of the paste specia
function and rearranging things but all i am able to generate ar
errors. I hope my question makes sense.

Thanks in adv for your help.
Jo

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Transposing a rng selected from a listbox

.Columns("EE:GL").Rows(cl).Copy _

Workbooks("bsapp_v2.xls").Worksheets("bsmain").Cel ls("C33"). _
PasteSpecial xlPasteAll, Transpose:=True

--
Regards,
Tom Ogilvy


"JoeH " wrote in message
...
Hi there,

I need some more help transposing the following the following: I've
pasted the whole part so you can see how i am getting my info:

Set rng = Range(progListBox.RowSource).Columns(1).Cells
cl = rng.Offset(progListBox.ListIndex, 0).Row
With Workbooks("bonddb.xls").Worksheets("database")

Load:
Range("Issr") = .Cells(cl, 1)
Range("Issr_local") = .Cells(cl, 2)
Range("Principal") = .Cells(cl, 4)
Range("Term") = .Cells(cl, 7)

*** .Columns("EE:GL").Rows(cl).Copy _


Destination:=Workbooks("bsapp_v2.xls").Worksheets( "bsmain").Rows(33).Columns
("C")
***

End With

*** is the code that i need to transposed from a row to a column when
it is pasted. I have tried many different combos of the paste special
function and rearranging things but all i am able to generate are
errors. I hope my question makes sense.

Thanks in adv for your help.
Joe


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Transposing a rng selected from a listbox

Tom,

I used what you put in and got an expected: end of statement error s
i put parens () around the xlpasteall, transpose and deleted the semico
: replayed and resulted in a type mismatch error. if it helps any m
VBA ver is listed as 6.3

Thanks for the quick reply
Sorry to be such a bother
Jo

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Transposing a rng selected from a listbox

I edited you code, so I didn't get it completely cleaned up.

I neglected to delete the line continuation character on the end of the copy
command and I had Cells("C33") with the cells left over from the original.
It should have been changed to Range("C33")

so the correction should have been

.Columns("EE:GL").Rows(cl).Copy

Workbooks("bsapp_v2.xls").Worksheets("bsmain").Ran ge("C33"). _
PasteSpecial xlPasteAll, Transpose:=True


Just to give you a sense of reassurance, this worked fine:

Sub AABBCC()
cl = 100
With Workbooks("bonddb.xls").Worksheets("database")
.Columns("EE:GL").Rows(cl).Copy
End With
Workbooks("bsapp_v2.xls").Worksheets("bsmain").Ran ge("C33"). _
PasteSpecial xlPasteAll, Transpose:=True

End Sub



--
Regards,
Tom Ogilvy


"JoeH " wrote in message
...
Tom,

I used what you put in and got an expected: end of statement error so
i put parens () around the xlpasteall, transpose and deleted the semicol
: replayed and resulted in a type mismatch error. if it helps any my
VBA ver is listed as 6.3

Thanks for the quick reply
Sorry to be such a bother
Joe


---
Message posted from http://www.ExcelForum.com/



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Transposing a rng selected from a listbox

!!!!! Thanks

Tom,

Where do i send the check :)
Sometimes i really hate being a novice. But with your help lately I'l
be able to figure this out alot quicker.

Thanks again

Joe Helferic

--
Message posted from http://www.ExcelForum.com

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
How to set the selected state of an embedded ActiveX listbox [email protected] Excel Discussion (Misc queries) 1 February 5th 07 09:30 PM
Listbox - write newly selected item back to the worksheet Cheryl Excel Programming 0 July 23rd 04 01:56 PM
Count number of selected item in Listbox Todd Huttenstine Excel Programming 4 June 14th 04 06:54 PM
How to make a new table based on selected result in listbox Kortrijker Excel Programming 1 February 25th 04 04:06 PM
Sorting ListBox results or transposing ListBox values to other cells for sorting Rob[_8_] Excel Programming 1 July 9th 03 04:35 AM


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