Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default .ListFillRange as Variable ? in Listbox

I am trying to create a Listbox and the ListFillRange is dependent
on what is in Sheet 2 Column 1. I am sure my mistake is something
simple but I cannot figure it out. Any help would be appreciated.

Lance



Sheets(2).Select
LastRow = Cells.Find("*", SearchOrder:=xlByRows,
SearchDirection:=xlPrevious).Row

DropRange = "'Sheet2!A1:" & LastRow & "'"


Sheets(1).Select
ActiveSheet.ListBoxes.Add(780, 65, 125, 500).Select
With Selection
.ListFillRange = DropRange
.LinkedCell = ""
.MultiSelect = xlExtended
.Display3DShading = False
End With

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default .ListFillRange as Variable ? in Listbox

DropRange = "'Sheet2'!A1:A" & LastRow

--
Regards,
Tom Ogilvy


wrote in message
...
I am trying to create a Listbox and the ListFillRange is dependent
on what is in Sheet 2 Column 1. I am sure my mistake is something
simple but I cannot figure it out. Any help would be appreciated.

Lance



Sheets(2).Select
LastRow = Cells.Find("*", SearchOrder:=xlByRows,
SearchDirection:=xlPrevious).Row

DropRange = "'Sheet2!A1:" & LastRow & "'"


Sheets(1).Select
ActiveSheet.ListBoxes.Add(780, 65, 125, 500).Select
With Selection
.ListFillRange = DropRange
.LinkedCell = ""
.MultiSelect = xlExtended
.Display3DShading = False
End With



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
ComboBox ListFillRange Stefi Excel Discussion (Misc queries) 14 April 21st 08 12:55 PM
Combo box - Listfillrange [email protected] Excel Discussion (Misc queries) 0 July 13th 07 09:51 AM
listbox.value not equal to listbox.list(listbox.listindex,0) ARB Excel Programming 0 October 22nd 03 12:46 AM
ListFillRange Dave Baranas Excel Programming 0 August 12th 03 05:09 AM
ListFillRange Dave Baranas Excel Programming 1 August 11th 03 11:08 PM


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