ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   copy from combobox to worksheet (https://www.excelbanter.com/excel-programming/432881-copy-combobox-worksheet.html)

antonvanelteren

copy from combobox to worksheet
 
I have programmed a few simple lines:

Private Sub ComboBox1_Change()
ComboBox1.Copy
ActiveSheet.Paste Destination:=Worksheets("RRS-FI tool").Range("G26:G26")
End Sub

The idea is that when I copy the (new) content of the ComboBox, the content
will be pasted in cell G26 of the worksheet. However, not the value of the
ComboBox is pasted, but another ComboBox.

If I look at the Clipboard, it is already a picture, not a value, although
the help text suggests that when copying from a ComboBox, the content value
is copied.

Any way to repair this?

Thanks! Anton

Patrick Molloy[_2_]

copy from combobox to worksheet
 
Private Sub ComboBox1_Change()
Range("G26") = Combobox1.Value
End Sub



"antonvanelteren" wrote:

I have programmed a few simple lines:

Private Sub ComboBox1_Change()
ComboBox1.Copy
ActiveSheet.Paste Destination:=Worksheets("RRS-FI tool").Range("G26:G26")
End Sub

The idea is that when I copy the (new) content of the ComboBox, the content
will be pasted in cell G26 of the worksheet. However, not the value of the
ComboBox is pasted, but another ComboBox.

If I look at the Clipboard, it is already a picture, not a value, although
the help text suggests that when copying from a ComboBox, the content value
is copied.

Any way to repair this?

Thanks! Anton



All times are GMT +1. The time now is 10:57 AM.

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