Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Combo Box Fill Range

Ok, I know I have seen this before but I can't seem to locate an answer for this. I am using a combo box from the forms menu and I need to have the macro set the .listfillrange to a value based on the last cell that contains data. The actual control is on a different sheet than the range of data that will fill it. Here is what I have right now but its not working, and like I said I know I have seen this before, but I just can't seem to find the answer

Sub ComboBoxFill(
Dim LastRow As Lon

Sheets("MenuControls").Selec
LastRow = Sheets("DataSheet").Cells(Rows.Count, "I").End(xlUp).Ro
ActiveSheet.Shapes("Drop Down 16").Selec
With Selectio
.ListFillRange = "DataSheet!I2:I" & LastRo
.LinkedCell = "DataSheet!$G$2
.DropDownLines = LastRow -
End Wit
End Su

Any help would be great, this is just frustrating me, and I know somewhere I had the solution before

Tim
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Combo Box Fill Range

Tim,

What is not working. It seems fine to me. What are you getting?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Tim Halligan" wrote in message
...
Ok, I know I have seen this before but I can't seem to locate an answer

for this. I am using a combo box from the forms menu and I need to have the
macro set the .listfillrange to a value based on the last cell that contains
data. The actual control is on a different sheet than the range of data
that will fill it. Here is what I have right now but its not working, and
like I said I know I have seen this before, but I just can't seem to find
the answer.


Sub ComboBoxFill()
Dim LastRow As Long

Sheets("MenuControls").Select
LastRow = Sheets("DataSheet").Cells(Rows.Count, "I").End(xlUp).Row
ActiveSheet.Shapes("Drop Down 16").Select
With Selection
.ListFillRange = "DataSheet!I2:I" & LastRow
.LinkedCell = "DataSheet!$G$2"
.DropDownLines = LastRow - 1
End With
End Sub

Any help would be great, this is just frustrating me, and I know somewhere

I had the solution before.

Tim



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
SumIf - when I fill down the Range, Criteria & sum range changes markholt Excel Worksheet Functions 3 October 28th 08 12:37 AM
Fill the values in combo box of excel sheet Priyanka Excel Worksheet Functions 0 February 8th 07 09:16 AM
I need a specific value in auto filter to fill a combo box and than match the select value in 2 other columns. Marc Excel Worksheet Functions 0 May 22nd 06 08:41 PM
combo box range - row Danny Excel Discussion (Misc queries) 0 April 18th 06 09:32 PM
Fill a combo box from a named area on a sheet Phil Walker Excel Programming 1 August 10th 03 05:54 PM


All times are GMT +1. The time now is 05:03 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"