inactiveUser214710
Board Regular
- Joined
- Apr 27, 2012
- Messages
- 171
Hi
My problem:<o
></o
>
<o
> </o
><o
></o
>
<o
></o
>
‘I use "CheckBox" to inform when registration is simple(False)or compound(True), and I introduce data to worksheet with this code:<o
></o
>
<o
> </o
><o
></o
>
<o
></o
>
If ChekBox.Value = False And CboBox1.Value<> "" And txtbox1.Value <> "" Then<o
></o
>
Set Rng =Sheets(CboMonth.Value).Cells(Rows.Count, "A").End(xlUp).Offset(1, 0)<o
></o
>
Rng.Offset(0, 1) = txtDat.Value ‘Date
Rng.Offset(0, 2) = CboBox1.Value ‘Product<o
></o
>
Rng.Offset(0, 3) = TxtBox1.Value ‘Cost<o
></o
>
End If<o
></o
>
<o
> </o
><o
></o
>
<o
></o
>
If ChekBox.Value = True And CboBox2.Value <> "" And txtbox2.Value<> "" And CboBox3.Value <> "" And txtbox3.Value <> Then<o
></o
>
Set Rng =Sheets(CboMonth.Value).Cells(Rows.Count, "A").End(xlUp).Offset(1, 0)<o
></o
>
Rng.Offset(0, 1) = txtDat.Value <o
></o
>
Rng.Offset(0, 4) =CboBox2.Value ‘ the goal is > > Rng.Offset(0, 2) but in the next line<o
></o
>
Rng.Offset(0, 5) = TxtBox2.Value ‘thegoal is > > Rng.Offset(0, 3) in the next line<o
></o
>
Rng.Offset(0, 6) = CboBox3.Value ‘the goal is > > Rng.Offset(0, 2) in the next line<o
></o
>
Rng.Offset(0, 7) = TxtBox3.Value ‘thegoal is > > Rng.Offset(0, 3) in thenext line<o
></o
>
<o
> </o
><o
></o
>
<o
></o
>
End If<o
></o
>
<o
> </o
><o
></o
>
<o
></o
>
I would like to introduce the values of (cbobox1, cbobox2 and cbobox3)at same row, i.e. in [ Rng.offset(0,2) ]. The same for the TxtBox1,2,3 [ Rng.Offset(0, 3) ]. <o
></o
>
It means that with one move at the Userform we could obtein severalmoves (compound move) in the worksheet.<o
></o
>
How can I do this? who help me? Please<o
></o
>
Thank you<o
></o
>
My problem:<o
<o
<o
‘I use "CheckBox" to inform when registration is simple(False)or compound(True), and I introduce data to worksheet with this code:<o
<o
<o
If ChekBox.Value = False And CboBox1.Value<> "" And txtbox1.Value <> "" Then<o
Set Rng =Sheets(CboMonth.Value).Cells(Rows.Count, "A").End(xlUp).Offset(1, 0)<o
Rng.Offset(0, 1) = txtDat.Value ‘Date
Rng.Offset(0, 2) = CboBox1.Value ‘Product<o
Rng.Offset(0, 3) = TxtBox1.Value ‘Cost<o
End If<o
<o
<o
If ChekBox.Value = True And CboBox2.Value <> "" And txtbox2.Value<> "" And CboBox3.Value <> "" And txtbox3.Value <> Then<o
Set Rng =Sheets(CboMonth.Value).Cells(Rows.Count, "A").End(xlUp).Offset(1, 0)<o
Rng.Offset(0, 1) = txtDat.Value <o
Rng.Offset(0, 4) =CboBox2.Value ‘ the goal is > > Rng.Offset(0, 2) but in the next line<o
Rng.Offset(0, 5) = TxtBox2.Value ‘thegoal is > > Rng.Offset(0, 3) in the next line<o
Rng.Offset(0, 6) = CboBox3.Value ‘the goal is > > Rng.Offset(0, 2) in the next line<o
Rng.Offset(0, 7) = TxtBox3.Value ‘thegoal is > > Rng.Offset(0, 3) in thenext line<o
<o
<o
End If<o
<o
<o
I would like to introduce the values of (cbobox1, cbobox2 and cbobox3)at same row, i.e. in [ Rng.offset(0,2) ]. The same for the TxtBox1,2,3 [ Rng.Offset(0, 3) ]. <o
It means that with one move at the Userform we could obtein severalmoves (compound move) in the worksheet.<o
How can I do this? who help me? Please<o
Thank you<o