Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,564
- Office Version
- 365
- 2016
- Platform
- Windows
Please consider this piece of code ...
temp_ws has been previously defined and set as a worksheet. The line in red creates a named range in workbook sports17.xlsm consisting of a range between M1 (rw_pr_start, 13), and P28 (rw_pr_end, 16) of worksheet ws_temp
The line in green is supposed to populate uf1_listbox3 with the 4 columns of data captured in the named range.
But the listbox is empty when it reaches the code. There are no errors. When I look up named range "missing_all" in sports17's name manager, the value is correct, and the reference is correct.
Is anyone able to help me correct this problem?
Rich (BB code):
Workbooks("Sports17.xlsm").Names.Add Name:="missing_all", RefersTo:=temp_ws.Range(temp_ws.Cells(rw_pr_start, 13), temp_ws.Cells(rw_pr_end, 16))
With uf2_assess_sched
.uf1_tb7.Value = ar
.uf1_tb8.Value = pr
.uf1_tb7.Locked = True
.uf1_tb8.Locked = True
.uf1_tb7.ForeColor = RGB(0, 52, 89)
.uf1_tb8.ForeColor = RGB(0, 52, 89)
If ar = 0 Then
.uf1_active.Value = False
.uf1_active.Locked = True
Else
.uf1_active.Value = True
.uf1_active.Locked = False
End If
If pr = 0 Then
.uf1_passive.Value = False
.uf1_passive.Locked = True
Else
.uf1_passive.Value = True
.uf1_passive.Locked = False
End If
With .uf1_listbox3
.Clear
.ForeColor = RGB(0, 52, 89)
.ColumnCount = 4
.ColumnWidths = "30;100;80;95"
.List = Range("missing_all").Value
.ListStyle = fmListStyleOption
'.Locked = True
.MultiSelect = fmMultiSelectSingle
End With
End With
temp_ws has been previously defined and set as a worksheet. The line in red creates a named range in workbook sports17.xlsm consisting of a range between M1 (rw_pr_start, 13), and P28 (rw_pr_end, 16) of worksheet ws_temp
The line in green is supposed to populate uf1_listbox3 with the 4 columns of data captured in the named range.
But the listbox is empty when it reaches the code. There are no errors. When I look up named range "missing_all" in sports17's name manager, the value is correct, and the reference is correct.
Is anyone able to help me correct this problem?