cache refactor2

This commit is contained in:
updsv7
2026-04-22 20:07:04 +09:00
parent 1c200c6820
commit dd0bd1f6a6
3 changed files with 7 additions and 12 deletions

View File

@@ -537,7 +537,7 @@ Private Sub RefreshSheetDict()
Set sheetConf = CreateObject("Scripting.Dictionary") Set sheetConf = CreateObject("Scripting.Dictionary")
sheetConf("StartRow") = 3 sheetConf("StartRow") = 3
sheetConf("KeyCol") = 6 sheetConf("KeyCol") = 6
sheetConf("ValueCols") = Array(6) sheetConf("ValueCols") = Array(7)
Set sheetConfDict("oufukuList") = sheetConf Set sheetConfDict("oufukuList") = sheetConf
Debug.Print "RefreshSheetDict oufukuList ok." Debug.Print "RefreshSheetDict oufukuList ok."
@@ -574,20 +574,14 @@ Public Function GetSheetConfig() As Object
End Function End Function
Public Function RefreshAllCache() As Boolean Public Function RefreshAllCache() As Boolean
' refresh ' refresh
Dim refreshCacheNames As Variant Dim refreshCacheNames As Variant
refreshCacheNames = Array("M1", "M1KukanDCache", "M2", "Z1", "Z2", "Z3", "Z4", "T1", "T2", "T3", "O1","O2") refreshCacheNames = Array("Z1", "Z2", "Z3", "Z4", "T1", "T2", "T3", "M1", "M1KukanDCache", "M2", "O1","O2", _
"tokubetuList", "kenshuList", "oufukuList", "koutaiList", "higaitouList", "errorList")
Dim refreshCacheName As Variant Dim refreshCacheName As Variant
For Each refreshCacheName In refreshCacheNames For Each refreshCacheName In refreshCacheNames
Call RefreshCache(refreshCacheName) Call RefreshCache(refreshCacheName)
Next refreshCacheName Next refreshCacheName
Call RefreshTokubetu RefreshAllCache = True
Call RefreshOufukuList
Call RefreshKoutaiList
Call RefreshHigaitouList
Call RefreshKenshuList
Call RefreshErrorList
RefreshCache = True
End Function End Function

View File

@@ -571,13 +571,14 @@ End Sub
' Clear row data and validation ' Clear row data and validation
Private Sub ClearRowData(ByVal rowNum As Long) Private Sub ClearRowData(ByVal rowNum As Long)
Dim sheetConfDict As Object: Set sheetConfDict = GetSheetConfig() Dim sheetConfDict As Object: Set sheetConfDict = GetSheetConfig()
Dim sheetConf As Object: Set sheetConf = sheetConfDict(ws.CodeName) Dim sheetConf As Object: Set sheetConf = sheetConfDict(Me.CodeName)
Dim startCol As String: startCol = sheetConf("StartCol") Dim startCol As String: startCol = sheetConf("StartCol")
Dim endCol As String: endCol = sheetConf("EndCol") Dim endCol As String: endCol = sheetConf("EndCol")
Dim errorCol As String: errorCol = sheetConf("ErrorCol") Dim errorCol As String: errorCol = sheetConf("ErrorCol")
Me.Range(Me.Cells(rowNum, startCol), Me.Cells(rowNum, endCol)).ClearContents Me.Range(Me.Cells(rowNum, startCol), Me.Cells(rowNum, endCol)).ClearContents
Me.Range(Me.Cells(rowNum, startCol), Me.Cells(rowNum, endCol)).Interior.Color = vbWhite
Me.Cells(rowNum, errorCol).ClearContents Me.Cells(rowNum, errorCol).ClearContents
Dim clearValidationCols As Variant Dim clearValidationCols As Variant