edit test cache

This commit is contained in:
updsv7
2026-04-16 19:04:02 +09:00
parent c661373369
commit db6a971473
18 changed files with 371 additions and 150 deletions

View File

@@ -320,29 +320,36 @@ End Sub
Private Sub FillAddressFromO1(ByVal rowNum As Long)
If o1Cache Is Nothing Then Call RefreshO1Cache
Dim empNo As String: empNo = Trim(Me.Cells(rowNum, 3).Value)
Dim empNo As String
empNo = Trim(Me.Cells(rowNum, 3).Value)
If empNo = "" Then Exit Sub
' Build dropdown list from O1 cache
' Build dropdown list from O1 cache: get all E values for the C
Dim dropdownList As String
Dim key As Variant
For Each key In o1Cache.Keys
If dropdownList = "" Then
dropdownList = key
Else
dropdownList = dropdownList & "," & key
End If
Next key
If o1Cache.Exists(empNo) Then
Dim innerDict As Object
Set innerDict = o1Cache(empNo)
Dim eKey As Variant
For Each eKey In innerDict.Keys
If dropdownList = "" Then
dropdownList = eKey
Else
dropdownList = dropdownList & "," & eKey
End If
Next eKey
End If
' Create dropdown for I column (住所)
With Me.Range("I" & rowNum).Validation
.Delete
.Add Type:=xlValidateList, Formula1:=dropdownList
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.InputMessage = ""
End With
If dropdownList <> "" Then
With Me.Range("I" & rowNum).Validation
.Delete
.Add Type:=xlValidateList, Formula1:=dropdownList
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.InputMessage = ""
End With
End If
End Sub
' Create transport (T) dropdown from Z1 cache