VBA - Excel Objects
VBA로 프로그램을 작성할 때, 기본이 되는 엑셀 개체들이 있다.
Application Objects Dim appName As String
appName = Application.ActiveWorkbook.Name
Debug.Print appName ''VBA_dedicated.xlsx
Workbook Objects ''Workbook object
Dim wb As Workbook
Set wb = Workbooks.Open(appPath & "\" & "VBA_dedicated.xlsx") ''workbook.fullname
Worksheet Objects ''Worksheet object
Dim ws As Worksheet
Set ws = Worksheets(1)
ws.Visible = False
Range Objects
''Range
Dim rng As Range
Set rng = Worksheets("Sheet1").Range("A1:A4")
rng.Value = 5
No comments:
Post a Comment