Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Not getting the result I was hoping for
This code is using the current (active) Worksheet to provide the list data
not Friday Workshifts. Can any one tell me what I have missed? Private Sub UserForm_Initialize() With Worksheets("Friday Workshifts") ListBox1.RowSource = "$A$2:$R$200" End With End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Not getting the result I was hoping for
Private Sub UserForm_Initialize()
Dim ws As Worksheet Dim curCell As Variant Dim r As Long Set ws = Worksheets("Friday Workshifts") ListBox1.Clear For r = 2 To 200 Set curCell = ws.Range("A" & r) If Not IsEmpty(curCell) Then ListBox1.AddItem (curCell) End If Next End Sub "Patrick C. Simonds" wrote: This code is using the current (active) Worksheet to provide the list data not Friday Workshifts. Can any one tell me what I have missed? Private Sub UserForm_Initialize() With Worksheets("Friday Workshifts") ListBox1.RowSource = "$A$2:$R$200" End With End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
hoping for help | Excel Programming | |||
Hoping | Excel Programming | |||
Can you automatically scale text in a graph? I'm hoping there's a way! | Excel Programming | |||
simple i am hoping with macros | Excel Discussion (Misc queries) | |||
Hoping its an easy question | Excel Programming |