Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Dump 2D array into Control

I want to dump data into a useform control with columns.
Similar to the control you see when you open up a file
directory with Detail(i.e. multiple rows and columns). Is
there a control for this available in VBA? If so can you
name the column headings? I also want to be able to click
onto the results of each row/column.

THanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Dump 2D array into Control

Use the Listbox

If you want to use an array, then you can't have headings. If you want
headings you would have to put your data on a sheet.

You need to set the properties of the control to show the number of columns
as you have in your array.

to simulate headings, you could put labels or textboxes above your listbox.

Private Sub Userform_Initialize()
with Listbox1
.Columncount = 5
.List = MyArray
End with
End Sub


--
Regards,
Tom Ogilvy


"ExcelMonkey" wrote in message
...
I want to dump data into a useform control with columns.
Similar to the control you see when you open up a file
directory with Detail(i.e. multiple rows and columns). Is
there a control for this available in VBA? If so can you
name the column headings? I also want to be able to click
onto the results of each row/column.

THanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Dump 2D array into Control

Thanks Tom. One more quick question. Can you adjust the
column width of each column within the listbox?

Thanks


-----Original Message-----
Use the Listbox

If you want to use an array, then you can't have

headings. If you want
headings you would have to put your data on a sheet.

You need to set the properties of the control to show the

number of columns
as you have in your array.

to simulate headings, you could put labels or textboxes

above your listbox.

Private Sub Userform_Initialize()
with Listbox1
.Columncount = 5
.List = MyArray
End with
End Sub


--
Regards,
Tom Ogilvy


"ExcelMonkey" wrote

in message
...
I want to dump data into a useform control with columns.
Similar to the control you see when you open up a file
directory with Detail(i.e. multiple rows and columns).

Is
there a control for this available in VBA? If so can

you
name the column headings? I also want to be able to

click
onto the results of each row/column.

THanks



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Dump 2D array into Control

Yes, but an explanation would be long winded. See the Columnwidths (note
the s on the end) property of the Listbox control.

An easy way to get there is to go to the object browser in the VBE, in the
search box, put columnwidths

Click on one of the columnwidths entries for combobox or listbox and hit F1.

--
Regards,
Tom Ogilvy

wrote in message
...
Thanks Tom. One more quick question. Can you adjust the
column width of each column within the listbox?

Thanks


-----Original Message-----
Use the Listbox

If you want to use an array, then you can't have

headings. If you want
headings you would have to put your data on a sheet.

You need to set the properties of the control to show the

number of columns
as you have in your array.

to simulate headings, you could put labels or textboxes

above your listbox.

Private Sub Userform_Initialize()
with Listbox1
.Columncount = 5
.List = MyArray
End with
End Sub


--
Regards,
Tom Ogilvy


"ExcelMonkey" wrote

in message
...
I want to dump data into a useform control with columns.
Similar to the control you see when you open up a file
directory with Detail(i.e. multiple rows and columns).

Is
there a control for this available in VBA? If so can

you
name the column headings? I also want to be able to

click
onto the results of each row/column.

THanks



.



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
Help with Control Array Sum Formula Jim May Excel Discussion (Misc queries) 12 October 26th 06 11:03 AM
how do I do a screen dump? NikiK Excel Discussion (Misc queries) 4 April 26th 05 08:02 PM
Creating a Control Array imrylin Excel Programming 4 March 3rd 05 04:35 AM
Control array - does it exist in VBA as in VB? Örjan Leringe Excel Programming 2 August 9th 04 06:30 PM
Dump 5D VBA array to 2D excel array ExcelMonkey[_63_] Excel Programming 4 February 3rd 04 06:56 PM


All times are GMT +1. The time now is 11:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"