ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   copy combobox - cell link to change automatically (https://www.excelbanter.com/excel-worksheet-functions/29780-copy-combobox-cell-link-change-automatically.html)

Bojana

copy combobox - cell link to change automatically
 
Is it possible to copy a created combobox and paste it in another cell so
that cell link is changed too?

Example: I have combo box in A1, cell link pointing to B1. I want to copy
the cbox to cell A2 and the cell link to point to B2.

Asking this because I need to copy 100 combo boxes...

Thanks in advance

Vasant Nanavati

I don't believe so; you will need a macro. Something like:

Sub Test()
Dim cbo As OLEObject
For Each cbo In ActiveSheet.OLEObjects
If TypeOf cbo.Object Is msforms.ComboBox Then
cbo.LinkedCell = cbo.TopLeftCell.Offset(, 1).Address
End If
Next
End Sub

--

Vasant

"Bojana" wrote in message
...
Is it possible to copy a created combobox and paste it in another cell so
that cell link is changed too?

Example: I have combo box in A1, cell link pointing to B1. I want to copy
the cbox to cell A2 and the cell link to point to B2.

Asking this because I need to copy 100 combo boxes...

Thanks in advance





All times are GMT +1. The time now is 03:40 AM.

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