Convert list to UPPER, lower & Proper cases.

Discussion in 'Excel Programming' started by L. Howard, Apr 6, 2014.

  1. L. Howard

    L. Howard Guest

    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
     
    L. Howard, Apr 9, 2014
    #21
    1. Advertisements

  2. L. Howard

    L. Howard Guest

    Hi Garry,

    Could you email me off forum please about an unrelated matter.


    Howard
     
    L. Howard, Apr 10, 2014
    #22
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.