+ Reply to Thread
Results 1 to 2 of 2

VBA - adding List box with linked cell and ListFillRange

  1. #1
    Registered User
    Join Date
    03-05-2009
    Location
    Vail, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    83

    Post VBA - adding List box with linked cell and ListFillRange

    The Excel 2007 Recorder does not seem to register all of the parameters:
    Running this code in MS Access 2007

    Help: need parameters to insert a list box on my Excel Worksheet - create a linked cell, and the ListRange

    ' this works - but leaves out the linked cell and ListFillRange
    ObjXL.ActiveSheet.OLEObjects.Add(ClassType:="Forms .ComboBox.1", Link:=False, _
    DisplayAsIcon:=False, Left:=209, Top:=36, Width:=170.25, Height:=25.5).Select

    ' this fails if the LinkedCell is added
    ObjXL.ActiveSheet.OLEObjects.Add(ClassType:="Forms .ComboBox.1", Link:=False, LinkedCell:="D1", _
    DisplayAsIcon:=False, Left:=209, Top:=36, Width:=170.25, Height:=25.5).Select

    Please Login or Register  to view this content.
    Last edited by RxMiller; 04-06-2011 at 04:53 PM. Reason: Solved

  2. #2
    Registered User
    Join Date
    03-05-2009
    Location
    Vail, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    83

    Post Re: VBA - adding List box with linked cell and ListFillRange

    Nobody responded, so I put it together after searching and tesing.


    Please Login or Register  to view this content.
    This formula relates to the LinkedCell above to change the formula.
    ObjXL.Range("E2").Select
    ObjXL.ActiveCell.FormulaR1C1 = _
    "=SUMPRODUCT(SUBTOTAL(3, OFFSET(R[4]C[-1]:R[5995]C[-1], ROW(R[4]C[-1]:R[5995]C[-1])-ROW(R[4]C[-1]),0,1)),--(R[4]C[-1]:R[5995]C[-1]=RC[-1]))"

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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