View Single Post
  #2   Report Post  
moi
 
Posts: n/a
Default

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