VB6.0用掲示板の過去のログ(No.2)−VBレスキュー(花ちゃん)
[記事リスト] [新規投稿] [新着記事] [ワード検索] [管理用]

投稿日: 2004/12/28(Tue) 18:37
投稿者花ちゃん
Eメール
URL
タイトルRe^3: クリップボードのデータから要素数を数えるには

テスト結果のままのコードなので、参考までに。

Private Sub Command2_Click()
    Dim myDate As String
    Dim cpCol As Integer
    Dim cpRow As Integer
    Dim myCol As Integer
    Dim myRow As Integer
    If Clipboard.GetFormat(vbCFText) Then
        myDate = Clipboard.GetText
    End If
    cpRow = UBound(Split(myDate, vbCrLf))
    If cpRow > 0 Then
        cpCol = (UBound(Split(myDate, vbTab)) / cpRow) + 1
    End If
    If cpRow = 0 Or cpCol = 0 Then Exit Sub
    myCol = 2
    myRow = 2
    With MSFlexGrid1
        .Col = myCol
        .Row = myRow
        .RowSel = myRow + cpRow - 1
        .ColSel = myCol + cpCol - 1
        .Clip = myDate
    End With
End Sub


- 関連一覧ツリー (★ をクリックするとツリー全体を一括表示します)

- 返信フォーム (この記事に返信する場合は下記フォームから投稿して下さい)

- VBレスキュー(花ちゃん) - - Web Forum -