+ Reply to Thread
Results 1 to 3 of 3

Cut/Copy Combobox - I can't update

  1. #1
    Registered User
    Join Date
    07-22-2005
    Posts
    4

    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!

  2. #2
    moi
    Guest

    Re: 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" <[email protected]> schreef in
    bericht news:[email protected]...
    >
    > 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. #3
    moi
    Guest

    Re: Cut/Copy Combobox - I can't update

    ....or set ColumnCount to 2 :-$


    "moi" <coffeecop@_NOSPAM_planet.nl> schreef in bericht
    news:[email protected]...
    > 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" <[email protected]> schreef in
    > bericht news:[email protected]...
    >>
    >> 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1