VBScript CreateObject 함수
정의와 사용법
CreateObject 함수는 지정된 유형의 객체를 생성할 수 있습니다.
문법
CreateObject(servername.typename[,location])
파라미터 | 설명 |
---|---|
servername | 필수 사항. 이 객체를 제공하는 애플리케이션 이름. |
typename | 필수 사항. 객체의 유형이나 클래스(type/class). |
location | 선택 사항. 객체를 어디서 생성할지. |
예제
예제 1
dim myexcel Set myexcel=CreateObject("Excel.Sheet") myexcel.Application.Visible=True ...code... myexcel.Application.Quit Set myexcel=Nothing