ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy Spreadsheet or listbox (https://www.excelbanter.com/excel-programming/363489-copy-spreadsheet-listbox.html)

Brandon Johnson

Copy Spreadsheet or listbox
 
Earlier i posted to put values in a spreadsheet but i want try to put
the values in a listbox instead. im getting a blank row with this
portion of code. Also i was wondering how i would change the columns in
the listbox. I have 0.75 pt in there right now with 13 columns. do i
have to repeat that .75pt 13 x's? Also is there any other efficient way
of doing this very same task no matter if its spreadsheet or listbox,
or etc. thankyou


For i = 1 To Worksheets("By Store").Cells.Count
If Worksheets("By Store").Cells(i, column).Value =
cboRefine Then
For z = 1 To 13
If m = 0 Then
strString = strString & Cells(i, z).Value & ";"
ElseIf m = 0 And m < 13 Then
strString = strString & Cells(i, z).Value & ";"
ElseIf m = 13 Then
strString = strString & Cells(i, z).Value
Exit Sub
End If
m = m + 1
Next
lstResults.AddItem strString
End If
Next



All times are GMT +1. The time now is 11:58 AM.

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