Darren Smith
Well-known Member
- Joined
- Nov 23, 2020
- Messages
- 631
- Office Version
- 2019
- Platform
- Windows
Trying to use values from various Worksheet cells , Listbox and Toggle Switch Value for the dictionary
See my attempt below.
The code runs till it gets to this Line
Then jumps over the rest of the code?
See my attempt below.
The code runs till it gets to this Line
VBA Code:
Set TPodWidth = UsForm.Toolpod_Width
VBA Code:
Sub DrNoDict()
Dim i As Long
Dim ar As Variant
Dim wsSource As Worksheet, wsDest As Worksheet
Dim K As Variant
Dim TPodWidth As ComboBox
Dim TPod As ToggleButton
Set TPodWidth = Body_And_Vehicle_Type_Form.Toolpod_Width
Set TPod = Body_And_Vehicle_Type_Form.Add_Toolpod
Set wsSource = ThisWorkbook.Worksheets("Drawing No")
Set wsDest = ThisWorkbook.Worksheets("Job Card Master")
If wsDest.Range("B2") = "Ford Transit" And wsDest.Range("D6") = "L2 Single" And TPodWidth = 600 And TPod.Value = False Then
ar = [A1].CurrentRegion
With CreateObject("Scripting.Dictionary")
For i = 6 To UBound(ar)
.Item(ar(i, 4)) = .Item(ar(i, 4))
Next i
For Each K In .Keys
Debug.Print K
Next K
End With
End If
End Sub