Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need to update a ComboBox when selecting a sheet | Excel Worksheet Functions | |||
Update Combobox with New Data | Excel Programming | |||
combobox update | Excel Programming | |||
Combobox update | Excel Programming | |||
Dynamic update on ComboBox | Excel Programming |