![]() |
Cut/Copy Combobox - I can't update
I want to cut a combobox in one sheet, and then paste it in another. Then i want to update the combobox with ListFillRange,Top and Left. My problem is that i can't update the combobox after i've pasted it. I've tried the following code-excample: ComboBox1.Cut Sheets(2).Select ActiveSheet.PasteSpecial Format:="Microsoft Forms 2.0 ComboBox Object", Link _ :=False, DisplayAsIcon:=False ComboBox1.ListFillRange = "A1:B2" ComboBox1.Top = 10 ..... Any help - is good help! -- MBais ------------------------------------------------------------------------ MBais's Profile: http://www.excelforum.com/member.php...o&userid=25476 View this thread: http://www.excelforum.com/showthread...hreadid=389299 |
Cut/Copy Combobox - I can't update
When I try this:
Public Sub MoveCombo() Dim wb As Workbook Dim ws1, ws2 As Worksheet Set wb = ThisWorkbook Set ws1 = wb.Sheets("Sheet1") Set ws2 = wb.Sheets("Sheet2") ws1.Activate ws1.ComboBox1.Select Selection.Cut ws2.Activate ActiveSheet.Paste ws2.OLEObjects(1).ListFillRange = "A1:B2" End Sub it seems to work. Only I can't get two columns in 1 Combo, so maybe A1:A2 or B1:B2 would be better. "MBais" schreef in bericht ... I want to cut a combobox in one sheet, and then paste it in another. Then i want to update the combobox with ListFillRange,Top and Left. My problem is that i can't update the combobox after i've pasted it. I've tried the following code-excample: ComboBox1.Cut Sheets(2).Select ActiveSheet.PasteSpecial Format:="Microsoft Forms 2.0 ComboBox Object", Link _ :=False, DisplayAsIcon:=False ComboBox1.ListFillRange = "A1:B2" ComboBox1.Top = 10 .... Any help - is good help! -- MBais ------------------------------------------------------------------------ MBais's Profile: http://www.excelforum.com/member.php...o&userid=25476 View this thread: http://www.excelforum.com/showthread...hreadid=389299 |
Cut/Copy Combobox - I can't update
....or set ColumnCount to 2 :-$
"moi" schreef in bericht ... When I try this: Public Sub MoveCombo() Dim wb As Workbook Dim ws1, ws2 As Worksheet Set wb = ThisWorkbook Set ws1 = wb.Sheets("Sheet1") Set ws2 = wb.Sheets("Sheet2") ws1.Activate ws1.ComboBox1.Select Selection.Cut ws2.Activate ActiveSheet.Paste ws2.OLEObjects(1).ListFillRange = "A1:B2" End Sub it seems to work. Only I can't get two columns in 1 Combo, so maybe A1:A2 or B1:B2 would be better. "MBais" schreef in bericht ... I want to cut a combobox in one sheet, and then paste it in another. Then i want to update the combobox with ListFillRange,Top and Left. My problem is that i can't update the combobox after i've pasted it. I've tried the following code-excample: ComboBox1.Cut Sheets(2).Select ActiveSheet.PasteSpecial Format:="Microsoft Forms 2.0 ComboBox Object", Link _ :=False, DisplayAsIcon:=False ComboBox1.ListFillRange = "A1:B2" ComboBox1.Top = 10 .... Any help - is good help! -- MBais ------------------------------------------------------------------------ MBais's Profile: http://www.excelforum.com/member.php...o&userid=25476 View this thread: http://www.excelforum.com/showthread...hreadid=389299 |
All times are GMT +1. The time now is 08:16 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com