문서의 이전 판입니다!
Function GetHangulTitle(value as String) dim idx idx = instr(value, "[") if idx > 0 then GetHangulTitle = Left(value, idx - 1) Exit Function end if GetHangulTitle = value End Function
Function GetDataType(colName As String, dataType As String, customerType As String)
If customerType > " " Then
GetDataType = customerType
Else
If Right(colName, 3) = "_YN" Then
GetDataType = "checkbox"
Else
If dataType = "nchar" Then
GetDataType = "nvarchar"
Else
GetDataType = dataType
End If
End If
End If
End Function
Sub CopyCellContents()
Dim objData As New DataObject
Dim strTemp As String
Dim str As String
Set rMulti = Selection.Cells()
For Each rCell In rMulti.Cells
str = rCell.Value
If str > "" Then
If strTemp > "" Then
strTemp = strTemp + Chr(10) + str
Else
strTemp = str
End If
End If
Next rCell
objData.SetText (strTemp)
objData.PutInClipboard
End Sub
DataObject는 MSForms를 필요로 한다.
MSForms가 목록에없고 참조 목록에서 찾을 수 없으면 참조를 추가 한 다음“찾아보기…”버튼을 눌러 파일을 찾습니다 당신 자신. MSForms는“FM20.dll”이라는 파일에 있습니다 (최소한 버전 2.0의 경우; 다른 버전은 그에 따라 번호가 매겨 질 것입니다) Windows \ System32 폴더 그런 식으로 추가 할 수 있어야합니다 ( UserForm 추가). 파일을 찾을 수 없으면 어떻게 든 얻을 수 있습니다 지워지고 Excel을 다시 설치해야 할 수도 있습니다.