I am looking for some code to write the user selections from a list box to a
dynamic worksheet range
something like
range ("rng1")= listbox1.list
and then resize the range dependent on the lengh of the list (list is 1
Column)
--
Fuzzy logix
I am looking for some code to write the user selections from a list box to a
dynamic worksheet range
something like
range ("rng1")= listbox1.list
and then resize the range dependent on the lengh of the list (list is 1
Column)
--
Fuzzy logix
Dim v as Variant
v = Listbox1.List
range("rng1").Resize(ubound(v,1)-lbound(v,1)+1,1).Value = v
--
Regards,
Tom Ogilvy
"blayne" <blayne@discussions.microsoft.com> wrote in message
news:3960FA18-6CC7-4083-84DB-A85BF878BAC1@microsoft.com...
> I am looking for some code to write the user selections from a list box to
a
> dynamic worksheet range
> something like
> range ("rng1")= listbox1.list
> and then resize the range dependent on the lengh of the list (list is 1
> Column)
> --
> Fuzzy logix
Thank you Tom,
--
Fuzzy logix
"Tom Ogilvy" wrote:
> Dim v as Variant
> v = Listbox1.List
> range("rng1").Resize(ubound(v,1)-lbound(v,1)+1,1).Value = v
>
> --
> Regards,
> Tom Ogilvy
>
> "blayne" <blayne@discussions.microsoft.com> wrote in message
> news:3960FA18-6CC7-4083-84DB-A85BF878BAC1@microsoft.com...
> > I am looking for some code to write the user selections from a list box to
> a
> > dynamic worksheet range
> > something like
> > range ("rng1")= listbox1.list
> > and then resize the range dependent on the lengh of the list (list is 1
> > Column)
> > --
> > Fuzzy logix
>
>
>
Works Fine
rng1 is a named range & I want to include the new information in the named
range
--
Fuzzy logix
"Tom Ogilvy" wrote:
> Dim v as Variant
> v = Listbox1.List
> range("rng1").Resize(ubound(v,1)-lbound(v,1)+1,1).Value = v
>
> --
> Regards,
> Tom Ogilvy
>
> "blayne" <blayne@discussions.microsoft.com> wrote in message
> news:3960FA18-6CC7-4083-84DB-A85BF878BAC1@microsoft.com...
> > I am looking for some code to write the user selections from a list box to
> a
> > dynamic worksheet range
> > something like
> > range ("rng1")= listbox1.list
> > and then resize the range dependent on the lengh of the list (list is 1
> > Column)
> > --
> > Fuzzy logix
>
>
>
Dim v as Variant
Dim rng as Range
v = Listbox1.List
set rng = range("rng1").Resize(ubound(v,1)-lbound(v,1)+1,1)
rng.Value = v
rng.Name = "rng1"
--
Regards,
Tom Ogilvy
"blayne" <blayne@discussions.microsoft.com> wrote in message
news:936B8FF8-2A3A-4B33-833D-3255CC4E9745@microsoft.com...
> Works Fine
> rng1 is a named range & I want to include the new information in the named
> range
> --
> Fuzzy logix
>
>
> "Tom Ogilvy" wrote:
>
> > Dim v as Variant
> > v = Listbox1.List
> > range("rng1").Resize(ubound(v,1)-lbound(v,1)+1,1).Value = v
> >
> > --
> > Regards,
> > Tom Ogilvy
> >
> > "blayne" <blayne@discussions.microsoft.com> wrote in message
> > news:3960FA18-6CC7-4083-84DB-A85BF878BAC1@microsoft.com...
> > > I am looking for some code to write the user selections from a list
box to
> > a
> > > dynamic worksheet range
> > > something like
> > > range ("rng1")= listbox1.list
> > > and then resize the range dependent on the lengh of the list (list is
1
> > > Column)
> > > --
> > > Fuzzy logix
> >
> >
> >
Thank you again
I came up with something simalar but your code is cleaner ( simpler)
--
Fuzzy logix
"Tom Ogilvy" wrote:
> Dim v as Variant
> Dim rng as Range
> v = Listbox1.List
> set rng = range("rng1").Resize(ubound(v,1)-lbound(v,1)+1,1)
> rng.Value = v
> rng.Name = "rng1"
>
> --
> Regards,
> Tom Ogilvy
>
>
> "blayne" <blayne@discussions.microsoft.com> wrote in message
> news:936B8FF8-2A3A-4B33-833D-3255CC4E9745@microsoft.com...
> > Works Fine
> > rng1 is a named range & I want to include the new information in the named
> > range
> > --
> > Fuzzy logix
> >
> >
> > "Tom Ogilvy" wrote:
> >
> > > Dim v as Variant
> > > v = Listbox1.List
> > > range("rng1").Resize(ubound(v,1)-lbound(v,1)+1,1).Value = v
> > >
> > > --
> > > Regards,
> > > Tom Ogilvy
> > >
> > > "blayne" <blayne@discussions.microsoft.com> wrote in message
> > > news:3960FA18-6CC7-4083-84DB-A85BF878BAC1@microsoft.com...
> > > > I am looking for some code to write the user selections from a list
> box to
> > > a
> > > > dynamic worksheet range
> > > > something like
> > > > range ("rng1")= listbox1.list
> > > > and then resize the range dependent on the lengh of the list (list is
> 1
> > > > Column)
> > > > --
> > > > Fuzzy logix
> > >
> > >
> > >
>
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks