Skip to content
조회 수 13886 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

Excel VBA)OpenDatabase 방법 [Excel 2003의 VBA 언어 참조]


‘사용 방법
Dim Filename As String
Dim CommandText As Object
Dim CommandType As Object
Dim BackgroundQuery As Object
Dim ImportDataAs As Object
Dim returnValue As Workbook
Dim workbooks1 As Workbooks
returnValue = workbooks1.OpenDatabase(Filename, CommandText, CommandType, BackgroundQuery, ImportDataAs)


'Declaration
Function OpenDatabase( _
	<InAttribute()> ByVal Filename As String, _
	<InAttribute()> Optional ByVal CommandText As Object, _
	<InAttribute()> Optional ByVal CommandType As Object, _
	<InAttribute()> Optional ByVal BackgroundQuery As Object, _
	<InAttribute()> Optional ByVal ImportDataAs As Object _
) As Workbook



 통합 문서 를 데이터베이스로 반환하여 가져오기.

expression.OpenDatabase(FileNameCommandTextCommandTypeBackgroundQueryImportDataAs)


조건.   개체 중 하나를 반환 표현식을 목록에 적용됩니다.


FileName  :          필수 문자열 . 

                            데이터베이스의 위치와 파일 이름을 포함하는 연결 문자열입니다.


CommandText   : 선택 변종 . 

                           쿼리의 명령 텍스트입니다.


CommandType  : 선택 변종 . 쿼리의 명령을 입력합니다. 

                           상수 중 하나를 지정 xlCmdType 열거

xlCmdCube , xlCmdList , xlCmdSql , xlCmdTable , 그리고xlCmdDefault .


BackgroundQuery   선택 변종 . 

                              이 매개 변수는 변형 데이터 형식하지만 당신은 단지 Boolean 값을 전달할 수 있습니다. 당신이 통과하는 경우 True를 , 쿼리가 백그라운드 (비동기)에서 수행됩니다. 기본값은 False를 .


ImportDataAs   선택 변종 . 

                        이 매개 변수는의 값 중 하나를 사용 XlImportDataAs를 열거합니다. 이 열거의 두 값은 xlPivotTableReport 및 xlQueryTable . 피벗 테이블 또는 QueryTable로 데이터를 반환하려면 다음 값 중 하나를 전달합니다. 기본값입니다 xlQueryTable .

이 예제에서는 Microsoft Excel은 "Northwind.mdb를"파일을 엽니다. \ 드라이브 :이 예제는 "Northwind.mdb 데이터 파일"이라는 파일이 C에 존재하는 것으로 가정합니다.

Sub UseOpenDatabase()
    ' Open the Northwind database in the background and create a PivotTable
    Workbooks.OpenDatabase Filename:="c:\Northwind.mdb", _
        CommandText:="Orders", _
        CommandType:=xlCmdTable, _
        BackgroundQuery:=True, _
        ImportDataAs:=xlPivotTableReport
End Sub


		

로그인 후 댓글쓰기가 가능합니다.

?

  1. 30
    Oct 2013
    17:04

    ahk) autohotkey 엑셀(Excel)에서 행값 증가시키기

    CategoryAutoHotKey Views37421
    Read More
  2. 09
    Jun 2013
    12:13

    Excel) 엑셀에서 셀 입력시 자동 추가글 넣기

    CategoryExcel Views24062
    Read More
  3. 17
    Sep 2012
    08:21

    현재 Excel 파일 이름을 셀에 삽입

    CategoryExcel Views24560
    Read More
  4. 16
    Jul 2012
    16:20

    [excel] GET.CELL사용법

    CategoryExcel Views26599
    Read More
  5. 30
    Jun 2012
    08:14

    PDF, EXCEL 파일 변환

    CategoryExcel Views19809
    Read More
  6. 13
    Feb 2012
    13:33

    MS Office 2007 Excel 최근 문서 목록 삭제하기

    CategoryExcel Views22229
    Read More
  7. 05
    Jan 2012
    07:01

    Excel Vba) 현재 셀에서 한줄내림 (activecell.offset(1,0).Select)

    CategoryExcel Views31024
    Read More
  8. 05
    Jan 2012
    07:00

    Excel Vba) 셀의 행, 열(column, row) 주소 알아내기 또는 삽입하기 더불어 제어하기

    CategoryExcel Views42975
    Read More
  9. 21
    Dec 2011
    14:36

    Excel) 엑셀 콤보박스 대화상자 목록지정하기

    CategoryExcel Views29391
    Read More
  10. 25
    Nov 2011
    13:03

    Excel VBA) 파일 이름에 따라 이미지 출력

    Category컴퓨터잡담 Views16209
    Read More
  11. 25
    Oct 2011
    19:49

    Excel VBA) 선택값에 따라 결과값 전달하기 CASE문

    Category컴퓨터잡담 Views14771
    Read More
  12. 24
    Oct 2011
    19:01

    Excel VBA (1): 셀 선택 및 변수 및 비활성시트 컨트롤하기

    Category컴퓨터잡담 Views25005
    Read More
  13. 23
    Oct 2011
    12:59

    Excel VBA) DAO를 이용하여 엑셀문서 열지않고 데이타 가져오기

    Category컴퓨터잡담 Views18275
    Read More
  14. 23
    Oct 2011
    08:20

    Excel VBA) Delete Column Excel VBA - 칼럼 지우기

    Category컴퓨터잡담 Views16349
    Read More
  15. 23
    Oct 2011
    07:51

    Excel VBA)OpenDatabase 방법 [Excel 2003의 VBA 언어 참조]

    Category컴퓨터잡담 Views13886
    Read More
  16. 23
    Oct 2011
    06:07

    eXCEL VBA)엑셀파일 열지않고 내용 불러오기

    Category컴퓨터잡담 Views30519
    Read More
  17. 17
    Oct 2011
    19:07

    Excel VBA) 자주쓰는 함수모음

    Category컴퓨터잡담 Views21678
    Read More
  18. 14
    Oct 2011
    18:29

    Excel VBA) 엑셀 데이터 범위 찾아내기

    Category컴퓨터잡담 Views15265
    Read More
  19. 14
    Oct 2011
    13:54

    Excel VBA) 원하는 범위 지정한 뒤 복사하여 붙여넣기

    Category컴퓨터잡담 Views29391
    Read More
  20. 28
    Sep 2011
    18:48

    Excel VBA) 자료모으기

    Category컴퓨터잡담 Views11903
    Read More
Board Pagination Prev 1 2 Next
/ 2

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소