Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Creating combo box with different number of variables
I currently have this macro set up to create a combo box. What I would like
to do is change the .ListFillRange so that if I add more rows of data it will pick these up automatically. The data always starts in "A1". Thanks Sub Macro1() ActiveSheet.DropDowns.Add(250.5, 451.5, 110.25, 25.5).Select With Selection .ListFillRange = "$A$1:$A$50" .LinkedCell = "$G$37" .DropDownLines = 8 .Display3DShading = False End With Range("A36").Select End Sub |
#2
|
|||
|
|||
Dim wb As Workbook
Dim ws As Worksheet Set wb = ThisWorkbook Set ws = wb.ActiveSheet ws.Cells(65536, 1).Select Selection.End(xlUp).Select Dim lfRange As String lfRange = "$A$1:$A$" & ActiveCell.Row ActiveSheet.DropDowns.Add(250.5, 451.5, 110.25, 25.5).Select With Selection .ListFillRange = lfRange .LinkedCell = "$G$37" .DropDownLines = 8 .Display3DShading = False End With Range("A36").Select End Sub "fullers" schreef in bericht ... I currently have this macro set up to create a combo box. What I would like to do is change the .ListFillRange so that if I add more rows of data it will pick these up automatically. The data always starts in "A1". Thanks Sub Macro1() ActiveSheet.DropDowns.Add(250.5, 451.5, 110.25, 25.5).Select With Selection .ListFillRange = "$A$1:$A$50" .LinkedCell = "$G$37" .DropDownLines = 8 .Display3DShading = False End With Range("A36").Select End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Seed numbers for random number generation, uniform distribution | Excel Discussion (Misc queries) | |||
combo box help | Excel Discussion (Misc queries) | |||
making a number be text | Excel Worksheet Functions | |||
How do I sort a column a unique number? | Excel Worksheet Functions | |||
Convert week number into calendar month? | Excel Worksheet Functions |