ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Export contents of multi-column listbox (https://www.excelbanter.com/excel-programming/424201-export-contents-multi-column-listbox.html)

LaDdIe

Export contents of multi-column listbox
 
Hi
How can I tranfer the contents of a mutil-column listbox1 (six columns) to
sheet3.

I wish to transfer data in columns 1,3,4,5 & 6 only to sheet3 starting at A2

Once this data is transfered I wish to email this data, unless there is a
way to transfer the data directly into the body of an email?

Any Idea's please


Jim Cone[_2_]

Export contents of multi-column listbox
 
Use the .List property of the Listbox to add the data to the worksheet.
The size of the area that gets the data should be the same size as the .List.
(the .List is an array)...

With Worksheets("Sheet3")
.Range(.Cells(2, 1), .Cells(x, y)).Value = Me.Listbox1.List
End With

Then delete Column 2.
You may want to check for existing data in the destination cells or
clear all six columns before adding new data.
--
Jim Cone
Portland, Oregon USA




"LaDdIe"

wrote in message
Hi
How can I tranfer the contents of a mutil-column listbox1 (six columns) to
sheet3.

I wish to transfer data in columns 1,3,4,5 & 6 only to sheet3 starting at A2

Once this data is transfered I wish to email this data, unless there is a
way to transfer the data directly into the body of an email?

Any Idea's please


LaDdIe

Export contents of multi-column listbox
 
Jim thanks for your reply,

However on running this code I get 'Run-Time error 1004' application-defined
or object-defined error.

Could you offer any help please.

"Jim Cone" wrote:

Use the .List property of the Listbox to add the data to the worksheet.
The size of the area that gets the data should be the same size as the .List.
(the .List is an array)...

With Worksheets("Sheet3")
.Range(.Cells(2, 1), .Cells(x, y)).Value = Me.Listbox1.List
End With

Then delete Column 2.
You may want to check for existing data in the destination cells or
clear all six columns before adding new data.
--
Jim Cone
Portland, Oregon USA




"LaDdIe"

wrote in message
Hi
How can I tranfer the contents of a mutil-column listbox1 (six columns) to
sheet3.

I wish to transfer data in columns 1,3,4,5 & 6 only to sheet3 starting at A2

Once this data is transfered I wish to email this data, unless there is a
way to transfer the data directly into the body of an email?

Any Idea's please



Jim Cone[_2_]

Export contents of multi-column listbox
 

I am unable to offer any help based upon the information you provided.
--
Jim Cone
Portland, Oregon USA




"LaDdIe"

wrote in message
Jim thanks for your reply,
However on running this code I get 'Run-Time error 1004' application-defined
or object-defined error.
Could you offer any help please.



"Jim Cone" wrote:
Use the .List property of the Listbox to add the data to the worksheet.
The size of the area that gets the data should be the same size as the .List.
(the .List is an array)...

With Worksheets("Sheet3")
.Range(.Cells(2, 1), .Cells(x, y)).Value = Me.Listbox1.List
End With

Then delete Column 2.
You may want to check for existing data in the destination cells or
clear all six columns before adding new data.
--
Jim Cone
Portland, Oregon USA





"LaDdIe"

wrote in message
Hi
How can I tranfer the contents of a mutil-column listbox1 (six columns) to
sheet3.

I wish to transfer data in columns 1,3,4,5 & 6 only to sheet3 starting at A2

Once this data is transfered I wish to email this data, unless there is a
way to transfer the data directly into the body of an email?

Any Idea's please


LaDdIe

Export contents of multi-column listbox
 
Thanks anyway,

I can build on what you've given me so far

"Jim Cone" wrote:


I am unable to offer any help based upon the information you provided.
--
Jim Cone
Portland, Oregon USA




"LaDdIe"

wrote in message
Jim thanks for your reply,
However on running this code I get 'Run-Time error 1004' application-defined
or object-defined error.
Could you offer any help please.



"Jim Cone" wrote:
Use the .List property of the Listbox to add the data to the worksheet.
The size of the area that gets the data should be the same size as the .List.
(the .List is an array)...

With Worksheets("Sheet3")
.Range(.Cells(2, 1), .Cells(x, y)).Value = Me.Listbox1.List
End With

Then delete Column 2.
You may want to check for existing data in the destination cells or
clear all six columns before adding new data.
--
Jim Cone
Portland, Oregon USA





"LaDdIe"

wrote in message
Hi
How can I tranfer the contents of a mutil-column listbox1 (six columns) to
sheet3.

I wish to transfer data in columns 1,3,4,5 & 6 only to sheet3 starting at A2

Once this data is transfered I wish to email this data, unless there is a
way to transfer the data directly into the body of an email?

Any Idea's please




All times are GMT +1. The time now is 07:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com