View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] lance-news@augustmail.com is offline
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