Dim infb As String Dim SUDOKU() As String Dim ix As Integer Dim iRow As Integer Dim iCol As Integer Dim NBK As Workbook Dim NSH As Worksheet infl = Application.GetOpenFilename("SUDOKU CSV(*.csv),(*.csv)", , "AI JIMYからの数読ファイル") If infl = "False" Then Exit Sub '展開先ブックを新規に作成する Set NBK = Application.Workbooks.Add ThisWorkbook.Sheets("数独パタン").Copy Before:=NBK.Sheets(1) Set NSH = NBK.Sheets("数独パタン") 'CSVファイルをOpenする infn = FreeFile Open infl For Input As #infn 1/3
Next ix iRow = 1 'Detailを処理する Do Until EOF(infn) iRow = iRow + 1 iCol = 2 '1Detail分を処理する For ix = 1 To 9 Input #infn, infb iCol = iCol + 1 NSH.Cells(iRow, iCol) = infb If infb <> "" Then Call InitialSUDOKU(NSH.Cells(iRow, iCol)) End If Next ix Loop 'CSVファイルをCloseする Close #infn 2/3
= xlSolid .PatternColorIndex = xlAutomatic .ThemeColor = xlThemeColorDark1 .TintAndShade = -4.99893185216834E-02 .PatternTintAndShade = 0 End With With inRNG .HorizontalAlignment = xlCenter .VerticalAlignment = xlCenter End With inRNG.Locked = True inRNG.FormulaHidden = False End Sub 1/1