Excel VBA質問箱 IV

当質問箱は、有志のボランティア精神のおかげで成り立っています。
問題が解決したら、必ずお礼をしましょうね。
本サイトの基本方針をまとめました。こちら をご一読ください。

投稿種別の選択が必要です。ご注意ください。
迷惑投稿防止のため、URLの入力を制限しています。ご了承ください。


41921 / 76732 ←次へ | 前へ→

【39885】Re:CSVファイルを読み込むやり方(ソース)
質問  エクセルホーリー  - 06/7/3(月) 15:51 -

引用なし
パスワード
   '*************************************************************************
'  ("E15:AF15") と ("E30:AF30")
'*************************************************************************
      Selection.Borders(xlInsideVertical).LineStyle = xlNone
      If count2 = 1 Then
        Range(Cells(15 + 31 * (count1 - 1), "E"), Cells(15 + 31 * (count1 - 1), "AF")).Select
      Else
        Range(Cells(30 + 31 * (count1 - 1), "E"), Cells(30 + 31 * (count1 - 1), "AF")).Select
      End If
      Selection.Borders(xlDiagonalDown).LineStyle = xlNone
      Selection.Borders(xlDiagonalUp).LineStyle = xlNone
      With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
      End With
      With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
      End With
      With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
      End With
      With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
      End With
'*************************************************************************
'  ("E16:AF16") と ("E31:AF31")
'*************************************************************************
      Selection.Borders(xlInsideVertical).LineStyle = xlNone
      If count2 = 1 Then
        Range(Cells(16 + 31 * (count1 - 1), "E"), Cells(16 + 31 * (count1 - 1), "AF")).Select
      Else
        Range(Cells(31 + 31 * (count1 - 1), "E"), Cells(31 + 31 * (count1 - 1), "AF")).Select
      End If
      Selection.Borders(xlDiagonalDown).LineStyle = xlNone
      Selection.Borders(xlDiagonalUp).LineStyle = xlNone
      With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
      End With
      With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
      End With
      With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
      End With
      With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
      End With
'*************************************************************************
'  ("B3:B16") と ("B18:B31")
'*************************************************************************
      Selection.Borders(xlInsideVertical).LineStyle = xlNone
      Range("R17").Select
      ActiveWindow.SmallScroll Down:=-6
      If count2 = 1 Then
        Range(Cells(3 + 31 * (count1 - 1), "B"), Cells(16 + 31 * (count1 - 1), "B")).Select
      Else
        Range(Cells(18 + 31 * (count1 - 1), "B"), Cells(31 + 31 * (count1 - 1), "B")).Select
      End If
      Selection.Borders(xlDiagonalDown).LineStyle = xlNone
      Selection.Borders(xlDiagonalUp).LineStyle = xlNone
      With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
      End With
      With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
      End With
      With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
      End With
      With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
      End With
'*************************************************************************
'  ("C4:C16") と ("C19:C31")
'*************************************************************************
      Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
      If count2 = 1 Then
        Range(Cells(4 + 31 * (count1 - 1), "C"), Cells(16 + 31 * (count1 - 1), "C")).Select
      Else
        Range(Cells(19 + 31 * (count1 - 1), "C"), Cells(31 + 31 * (count1 - 1), "C")).Select
      End If
      Selection.Borders(xlDiagonalDown).LineStyle = xlNone
      Selection.Borders(xlDiagonalUp).LineStyle = xlNone
      With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
      End With
      With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
      End With
      With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
      End With
      With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .Weight = xlThin
        .ColorIndex = xlAutomatic
      End With

0 hits

【39882】CSVファイルを読み込むやり方 エクセルホーリー 06/7/3(月) 15:42 質問
【39883】Re:CSVファイルを読み込むやり方(ソース) エクセルホーリー 06/7/3(月) 15:48 質問
【39884】Re:CSVファイルを読み込むやり方(ソース) エクセルホーリー 06/7/3(月) 15:50 質問
【39885】Re:CSVファイルを読み込むやり方(ソース) エクセルホーリー 06/7/3(月) 15:51 質問
【39886】Re:CSVファイルを読み込むやり方(ソース) エクセルホーリー 06/7/3(月) 15:51 質問
【39900】Re:CSVファイルを読み込むやり方(ソース... 漂流民 06/7/4(火) 1:18 発言
【39907】Re:CSVファイルを読み込むやり方(ソース... エクセルホーリー 06/7/4(火) 9:22 質問
【39911】Re:CSVファイルを読み込むやり方(ソース... neptune 06/7/4(火) 9:40 回答
【39912】Re:CSVファイルを読み込むやり方(ソース... エクセルホーリー 06/7/4(火) 10:21 お礼

41921 / 76732 ←次へ | 前へ→
ページ:  ┃  記事番号:
2610219
(SS)C-BOARD v3.8 is Free