473,385 Members | 1,311 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

listbox to array to excel row

Dim temp(Me.TimeIncrementListBox.Items.Count) As String
Dim i As Int32
....
For i = 0 To UBound(temp) - 1
temp(i) = CType(Me.TimeIncrementListBox.Items(i), String)
Next
xlSheet.Range("X10").Resize(1, Me.TimeIncrementListBox.Items.Count).Value =
temp

The above works but,
Can I transfer the contents of the listbox directly to the Excel range,
without the array?
Can I transfer the contents of the listbox into the array in one swell foop,
without the loop?

Humbly,

Doug Glancy
Nov 21 '05 #1
2 1784
Doug,

I doubt it, however how much time in nanoseconds do you think that this
take, while when there is a method which does it in one time, would do it
probably in the same way.

I would not take to much time to investigate this kind of things.

Just my thought,

Cor

"Doug Glancy" .
Dim temp(Me.TimeIncrementListBox.Items.Count) As String
Dim i As Int32
...
For i = 0 To UBound(temp) - 1
temp(i) = CType(Me.TimeIncrementListBox.Items(i), String)
Next
xlSheet.Range("X10").Resize(1, Me.TimeIncrementListBox.Items.Count).Value
= temp

The above works but,
Can I transfer the contents of the listbox directly to the Excel range,
without the array?
Can I transfer the contents of the listbox into the array in one swell
foop, without the loop?

Humbly,

Doug Glancy

Nov 21 '05 #2
Thanks Cor. Good to know I'm on the right track.

Doug

"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
Doug,

I doubt it, however how much time in nanoseconds do you think that this
take, while when there is a method which does it in one time, would do it
probably in the same way.

I would not take to much time to investigate this kind of things.

Just my thought,

Cor

"Doug Glancy" .
Dim temp(Me.TimeIncrementListBox.Items.Count) As String
Dim i As Int32
...
For i = 0 To UBound(temp) - 1
temp(i) = CType(Me.TimeIncrementListBox.Items(i), String)
Next
xlSheet.Range("X10").Resize(1, Me.TimeIncrementListBox.Items.Count).Value
= temp

The above works but,
Can I transfer the contents of the listbox directly to the Excel range,
without the array?
Can I transfer the contents of the listbox into the array in one swell
foop, without the loop?

Humbly,

Doug Glancy


Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: 00_ChInkPoIntD12 | last post by:
Can anyone confirm there isn't a Sort() method for WebControl Listbox in Asp.net? It is rather simple to write a method to do the sorting, but just wondering I shouldn't invent the wheel if...
3
by: George | last post by:
Sub ExcelToListBox() Dim xRange As Object Dim ary Dim xValue As String xRange = oXL.Range("A1:A9") 'has letters A-H ary = xRange.value xValue = ary(3, 1) 'xValue = C...
14
by: Paul_Madden via DotNetMonster.com | last post by:
Basically I have a listbox to which I add simple STRING items- I have a progress bar which I increment whenever I populate another portion of the complete set of items I wish to add. What I observe...
6
by: Paul | last post by:
Hi All, Framework 1.1 listbox control unable to DataBind I've been googling for an answer to this query that appears quite a lot, but none, it seem, answers my problem directly. I am...
1
by: bbasberg | last post by:
Hello, I am wondering how to "carry over" a value from a listbox on one worksheet in the workbook to a cell in another worksheet in the same workbook. For example, to just copy over a value...
2
by: dan NY | last post by:
I'm a struggling new VB Applications user that has what may be a simple question, but I've been struggling with it. I'm using a response to a message box YesNo question to cause one of two...
0
by: crespo | last post by:
hi,everyone. I have a question about using listbox in a customized user control.I use a listbox directly in a asp.net page and it works very well,but when I use the same code in a user...
0
by: dev121 | last post by:
Hi, I am currently trying to copy a single selected item from a listbox control in vba (excel). So far I have got this code, which doesn't work. <code> Private Sub btnAddNewOrder_Click()
1
by: Sunray | last post by:
I have a form called the sales form and i have 2 sets of listboxes So what happens is. i add items form the bottom set of list boxes which are bound to a data base to the top set of list boxes which...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.