set combobox dropdown as dynamic range of values

我的梦境 提交于 2020-01-24 20:56:07

问题


Last time I asked about this I got given a solution that worked but I can no longer get that code to run.

before I tried this:

Set cell vlookup value based on changing Combobox value

Sub DropDown7_Change()

Application.ScreenUpdating = False

Dim vlook_val As String
Dim v_table_array As Range
'Dim totals_sheet As Worksheet
Dim col_index As Integer
Dim col_index_1 As Integer
Dim result As Variant
Dim result_1 As Variant

Dim list_val As Long

    list_val = Worksheets("front page").Shapes("Drop Down 7").ControlFormat.Value
    Sheets("front page").Range("K9") = Worksheets("pipe_totals").Cells((list_val + 1), 1)

Call front_page_vlookup(vlook_val, v_table_array, col_index, col_index_1, result, result_1)
Application.ScreenUpdating = True

End Sub

I am trying to set a combobox drop down list as a row in another sheet which will have varying length. The combobox I am using is called Drop Down 7. I set the list as column a in Sheets("pipe_totals") and the value selected in the dropdown list populates cell K9, which I then use as a vlookup value for some other operations.

Any idea how I can get this to work?

Thank you

来源:https://stackoverflow.com/questions/28113254/set-combobox-dropdown-as-dynamic-range-of-values

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!