데이터 입력 폼 을 사용합니다.
Syntax
public DataItem ShowDataForm( Excel.Range target, string dsName )
Parameters
target |
|---|
Type: Excel.Range
데이터 입력 폼 을 띄울 cell
dsName |
|---|
Type: String
Dataset 표시명
Return Value
Type: Object (DataItem)
정상일 경우 : Object
오류 일경우 : null
데이터 입력 폼 생성 예제
'==========================================================================
'특정 Sheet 더블클릭 이벤트 정의
'==========================================================================
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Cancel = True '기본 더블클릭 기능 취소
ShowDatasetForm Target '입력폼 생성
End Sub
'==========================================================================
'입력 폼 생성후 해당 cell 에 값 지정
'==========================================================================
Public Sub ShowDatasetForm(ByVal Target As Range)
Dim mxmodule As Object
Dim result As Object
Set mxmodule = Application.COMAddIns.Item("iMATRIX6.ExcelModule").Object
Set result = mxmodule.xapi.ShowDataForm(Target, "DS1")
'첫번째 컬럼의 값을 사용
If result Is Nothing = False Then Target.Value = result.GetValue(1)
End Sub