Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
moi moi is offline
external usenet poster
 
Posts: 27
Default 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   Report Post  
Posted to microsoft.public.excel.programming
moi moi is offline
external usenet poster
 
Posts: 27
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to update a ComboBox when selecting a sheet [email protected] Excel Worksheet Functions 1 October 31st 07 02:23 PM
Update Combobox with New Data keepitcool Excel Programming 0 June 3rd 04 08:15 AM
combobox update Josh[_9_] Excel Programming 2 February 24th 04 05:22 PM
Combobox update Robert Couchman[_4_] Excel Programming 0 February 20th 04 09:13 AM
Dynamic update on ComboBox Kevin Excel Programming 4 October 14th 03 12:45 PM


All times are GMT +1. The time now is 05:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"