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

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.
Similar Threads
  1. Matt

    Changing from lower to upper case

    Matt, Jan 8, 2004, in forum: Excel Programming
    Replies:
    7
    Views:
    152
    David McRitchie
    Jan 8, 2004
  2. Replies:
    1
    Views:
    136
    Tom Ogilvy
    Jan 9, 2004
  3. Upper and Lower Bounds and Rnd

    , Jan 8, 2004, in forum: Excel Programming
    Replies:
    3
    Views:
    744
    Bob Phillips
    Jan 9, 2004
  4. Upper/Lower Bounds

    , Jan 8, 2004, in forum: Excel Programming
    Replies:
    0
    Views:
    154
  5. mike allen

    detect upper and lower case letters

    mike allen, Jun 5, 2004, in forum: Excel Programming
    Replies:
    3
    Views:
    165
    Cecilkumara Fernando
    Jun 5, 2004
  6. mtm4300 via OfficeKB.com

    Cases within Cases

    mtm4300 via OfficeKB.com, Feb 16, 2006, in forum: Excel Programming
    Replies:
    7
    Views:
    235
    Tom Ogilvy
    Feb 19, 2006
  7. VBA Noob

    Upper, Lower & Proper case

    VBA Noob, Jul 8, 2006, in forum: Excel Programming
    Replies:
    2
    Views:
    665
    VBA Noob
    Jul 8, 2006
  8. JS
    Replies:
    2
    Views:
    145
Loading...