Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
CODE PROBLEM
Help appreciated
I have the following code: Private Sub ComboBox1_Change() With Me.ComboBox1.TopLeftCell ..Offset(0, 5) = "NIN" ..Offset(0, 6) = "NOUT" ..Offset(0, 7) = "ZALT" ..Offset(0, 8) = "ZDTAMB" ..Offset(0, 9) = "ZDT1A" ..Offset(0, 10) = "ZERM1A" ..Offset(0, 11) = "ZPWXH" However the .Offset mode to generate the list in quotes is a long list. Is there a more compact way of generating this same list? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
CODE PROBLEM
Maybe this
With Me.ComboBox1.TopLeftCell .Offset(0, 5).Resize(, 4) = _ Array("NIN", "NOUT", "ZALT", "ZDTAMB") End With Why not copy the values in a range on your sheet and hide it You can copy it then in one step -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "N.F" wrote in message ... Help appreciated I have the following code: Private Sub ComboBox1_Change() With Me.ComboBox1.TopLeftCell .Offset(0, 5) = "NIN" .Offset(0, 6) = "NOUT" .Offset(0, 7) = "ZALT" .Offset(0, 8) = "ZDTAMB" .Offset(0, 9) = "ZDT1A" .Offset(0, 10) = "ZERM1A" .Offset(0, 11) = "ZPWXH" However the .Offset mode to generate the list in quotes is a long list. Is there a more compact way of generating this same list? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
CODE PROBLEM
Thank YOU RON!
"Ron de Bruin" wrote: Maybe this With Me.ComboBox1.TopLeftCell .Offset(0, 5).Resize(, 4) = _ Array("NIN", "NOUT", "ZALT", "ZDTAMB") End With Why not copy the values in a range on your sheet and hide it You can copy it then in one step -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "N.F" wrote in message ... Help appreciated I have the following code: Private Sub ComboBox1_Change() With Me.ComboBox1.TopLeftCell .Offset(0, 5) = "NIN" .Offset(0, 6) = "NOUT" .Offset(0, 7) = "ZALT" .Offset(0, 8) = "ZDTAMB" .Offset(0, 9) = "ZDT1A" .Offset(0, 10) = "ZERM1A" .Offset(0, 11) = "ZPWXH" However the .Offset mode to generate the list in quotes is a long list. Is there a more compact way of generating this same list? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VB Code Problem | Excel Discussion (Misc queries) | |||
XLS to CSV Code Problem | Excel Worksheet Functions | |||
Strange problem with Code | Excel Worksheet Functions | |||
Little problem with this code... | Excel Discussion (Misc queries) | |||
Can anyone figure this code problem please | Excel Discussion (Misc queries) |