View Single Post
  #21   Report Post  
Posted to microsoft.public.excel.programming
L. Howard L. Howard is offline
external usenet poster
 
Posts: 852
Default Convert list to UPPER, lower & Proper cases.

On Tuesday, April 8, 2014 8:30:43 PM UTC-7, GS wrote:
Dim vData




vData = Range("A1:A3")




With ListBox1




.ColumnCount = UBound(vData, 2) '//# of cols in the array




.List = vData




End With








..results




a1




a2




a3








..and...




Dim vData




vData = Range("A1:C1")




With ListBox1




.ColumnCount = UBound(vData, 2) '//# of cols in the array




.List = vData




End With








..results




a1 a2 a3








--




Garry






If a list box was not used what would a 'typical' code look like?


And to return the data would you just use something like


.Range("F1") = vData


if so does F1 need to be Resized?




With "What instead of List Box"




.ColumnCount = UBound(vData, 2) '//# of cols in the array




.List = vData




End With




Howard




Yes! Any time you 'dump' an array into a worksheet the target range

needs to match the size of the arrays for both rows & cols!



Range("F1").Resize(UBound(vData, UBound(vData, 2)) = vData



--

Garry



Okay, thanks.

H