Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
fullers
 
Posts: n/a
Default 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   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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Seed numbers for random number generation, uniform distribution darebo Excel Discussion (Misc queries) 3 April 21st 23 09:02 PM
combo box help littlegreenmen1 Excel Discussion (Misc queries) 5 June 7th 05 06:27 PM
making a number be text Fredrated Excel Worksheet Functions 2 June 1st 05 02:37 AM
How do I sort a column a unique number? ChelleA Excel Worksheet Functions 7 February 19th 05 10:38 AM
Convert week number into calendar month? WickyWick Excel Worksheet Functions 2 November 9th 04 09:01 PM


All times are GMT +1. The time now is 05:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"