ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sending user selected daa from cmblistbx to sheets of destination (https://www.excelbanter.com/excel-programming/291785-sending-user-selected-daa-cmblistbx-sheets-destination.html)

No Name

Sending user selected daa from cmblistbx to sheets of destination
 
Hello,

I have a userform which will be filled out by user.
(PlantForm192) it has a frame box with controls inside.
among those controls are three cmbolistboxes Named
respectively..PlntCmbBx1, PlntCmbBx2, & PlntCmbBx3.
Each has a list referenced from a range in a worksheet.
(a plant list)
and to the side of each CmbBx there is a TxtBox
(respectively called QntytxtBx1 thru QntytxtBx3.
a user will select a plant from each list and then type
in how much was planted. I would like the ( i think yur
supposed to) frame control to round up the selected plant
and qnty data from each list and send it to its
appropriate sheets by section. There are 23 sections (
areas=wrkshts)
Oh the Section are selectable as well. a CmboBoxlst
called SctnCmbBxlst. it has a list of all the wrkshts
which are names of sections

I have a partial code from a earlier discussion and been
abused by me a few times..... any one help me walk thru
this one??
Is there a Variable array we can do with wrkshts? all the
same type and formats? or do i have to label each one in
the first line as "varr"?

code follows: *i dont know do i need to do one for each
cmbbox and so on?? and is the value in paratheses the
name of the range for that item being searched?

varr = Array("Section1","Section2","Section3"......
"Section23")'i dont know how to do this one'
'how do i do the frame control here somewhere?'
With PlantForm192.PlntcmbBx1
for i = 0 to .Listcount -1
if .Selected(i) = True then
sPlant = .List(i,0)

for each sh in Worksheets(varr)
set rng = sh.Cells.Find(sSection)
if not rng is nothing then
set rng1 = sh.Cells.Find(sPlant)
if not rng1 is nothing then
rng1.Offset(0,1).Value = sQty
exit for
end if
end if
Next sh
End With


any ideas?

THANKS!!!


All times are GMT +1. The time now is 05:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com