Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim v as Variant
v = Listbox1.List range("rng1").Resize(ubound(v,1)-lbound(v,1)+1,1).Value = v -- Regards, Tom Ogilvy "blayne" wrote in message ... 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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" wrote in message ... 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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" wrote in message ... 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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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" wrote in message ... 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" wrote in message ... 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 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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" wrote in message ... 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" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Data Validation List from a Dynamic Named Range on Another Workshe | Excel Worksheet Functions | |||
List vs Dynamic Range Name | Excel Discussion (Misc queries) | |||
ListBox "dynamic fill range" | Excel Programming | |||
Making a Dynamic List in Listbox | Excel Programming | |||
listbox.value not equal to listbox.list(listbox.listindex,0) | Excel Programming |