Revert to simple worksheet lookup
This commit is contained in:
@@ -38,19 +38,7 @@ Sub FillFromKukanMaster(ByVal ws As Worksheet, ByVal rowNum As Long, Optional By
|
|||||||
Dim code As String
|
Dim code As String
|
||||||
|
|
||||||
On Error Resume Next
|
On Error Resume Next
|
||||||
' Try to find worksheet with partial match
|
Set wsKukan = ThisWorkbook.Worksheets("区間メンテナンス")
|
||||||
Dim wsName As String
|
|
||||||
wsName = "区間メンテナンス"
|
|
||||||
Set wsKukan = Nothing
|
|
||||||
Dim s As Worksheet
|
|
||||||
For Each s In ThisWorkbook.Worksheets
|
|
||||||
If InStr(1, s.Name, "区間", vbTextCompare) > 0 Then
|
|
||||||
Set wsKukan = s
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
If wsKukan Is Nothing Then Set wsKukan = ThisWorkbook.Worksheets(wsName)
|
|
||||||
|
|
||||||
If wsKukan Is Nothing Then
|
If wsKukan Is Nothing Then
|
||||||
Dim wsList As String
|
Dim wsList As String
|
||||||
Dim s As Worksheet
|
Dim s As Worksheet
|
||||||
|
|||||||
Reference in New Issue
Block a user