Coding for Combo Box to copy value as text to next empty cell in sheet2

nadrian

New Member
Joined
Nov 29, 2016
Messages
21
Hi,

I am new here and I would like to have data from 6 combo boxes (Text) only to second sheet for record. I have linked cells to combo boxes but its not saving value to next available cell. There text fields as well which works fine when I click on Submit button.


Please help

Code:
===================================================
Private Sub CommandButton1_Click()



Range("C10").Copy Destination:=Worksheets("Record").Cells(Worksheets("Record").Rows.Count, "B").End(xlUp).Offset(1, 0)


Range("C11").Copy Destination:=Worksheets("Record").Cells(Worksheets("Record").Rows.Count, "C").End(xlUp).Offset(1, 0)


Range("C12").Copy Destination:=Worksheets("Record").Cells(Worksheets("Record").Rows.Count, "D").End(xlUp).Offset(1, 0)


Range("C13").Copy Destination:=Worksheets("Record").Cells(Worksheets("Record").Rows.Count, "E").End(xlUp).Offset(1, 0)


Range("C14").Copy Destination:=Worksheets("Record").Cells(Worksheets("Record").Rows.Count, "F").End(xlUp).Offset(1, 0)


Range("C15").Copy Destination:=Worksheets("Record").Cells(Worksheets("Record").Rows.Count, "G").End(xlUp).Offset(1, 0)


Range("C16").Copy Destination:=Worksheets("Record").Cells(Worksheets("Record").Rows.Count, "H").End(xlUp).Offset(1, 0)


Range("C19").Copy Destination:=Worksheets("Record").Cells(Worksheets("Record").Rows.Count, "K").End(xlUp).Offset(1, 0)


Range("C22").Copy Destination:=Worksheets("Record").Cells(Worksheets("Record").Rows.Count, "N").End(xlUp).Offset(1, 0)






Range("C10").Value = ""
Range("C11").Value = ""
Range("C12").Value = ""
Range("C13").Value = ""
Range("C14").Value = ""
Range("C15").Value = ""
Range("C16").Value = ""
Range("C19").Value = ""
Range("C22").Value = ""




End Sub
==============================
 
Unfortunately problem still there. When I select value from combo box it copies twice in sheet2. what is the solution for this issue.
Waiting for your kind reply.

Regards



So are things working for you now? You should never be having the problem you mentioned in post #16. Unless some how you have not modified each combobox script properly.
 
Upvote 0

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Do you still have the Comboboxes linked to some cell? If so please unlink them.

And show me the script you have in the Combobox.

And you are not clicking on any sort of "Submit" button correct?
 
Upvote 0
EXCELLENT, YOUR ARE GREAT MAN, Its works perfect now. Finally I stopped banging my head with Wall:oops:.

THANKS YOUR VERY MUCH GUYZ.

Great help in this FORUM.






Do you still have the Comboboxes linked to some cell? If so please unlink them.

And show me the script you have in the Combobox.

And you are not clicking on any sort of "Submit" button correct?
 
Upvote 0

Forum statistics

Threads
1,215,007
Messages
6,122,670
Members
449,091
Latest member
peppernaut

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