The compound move in same rowf

inactiveUser214710

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

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Forum statistics

Threads
1,206,815
Messages
6,075,014
Members
446,114
Latest member
FadDak

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top