0% found this document useful (0 votes)
62 views6 pages

Lập Trình SQL

The document contains syntax and explanations for common Microsoft Excel functions and operations. It includes summaries of functions for selecting data, filtering data, inserting and updating values, managing workbooks and worksheets, copying and moving sheets, naming sheets, and handling errors. Key functions are explained such as SELECT, WHERE, COPY, SAVE, CLOSE, DELETE, FIND and more.

Uploaded by

SonNguyen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views6 pages

Lập Trình SQL

The document contains syntax and explanations for common Microsoft Excel functions and operations. It includes summaries of functions for selecting data, filtering data, inserting and updating values, managing workbooks and worksheets, copying and moving sheets, naming sheets, and handling errors. Key functions are explained such as SELECT, WHERE, COPY, SAVE, CLOSE, DELETE, FIND and more.

Uploaded by

SonNguyen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 6

SYNTAX KEY WORK

SELECT column1, column2,… FROM table_name;

SELECT * FROM table_name; *

Me.textbox.SetFocus SetForcus

Me.

Me.textbox.Tag Tag

SELECT DISTINCT column1, column2,... FROM table_name; DISTINCT

SELECT column1, column2,... FROM table_name WHERE condition1 AND/OR WHERE


condition2;

AND

OR

SELECT column1, column2,... FROM table_name WHERE column_name IN


IN
(value1, value2,...);

CurrentDb.Execute CurrentDb

Execute

INSERT INTO table_name (column1, column2,...) VALUES (value1,


value2,...);

UPDATE table_name SET column1=value1, column2=value2,... WHERE


condition;

subJOINTS.Form.Requery Requery

sheet1.cells(rows.count,1).end(xlup).row endRow

sheet1.cells(1,columns.count).end(xltoright).column endCol

Page 1 of 6
SYNTAX KEY WORK

Sheet1.Range(.Cells(endRow, "a"), .Cells(endRow, endCol).Select Select

Workbooks.Add Add

Worksheets.Add Add

Application.Workbooks("myFile.xlsx").Activate Active

Application.Workbooks.Open("D:\test\Output.xlsx") Open

Workbooks(“Workbook Name”).Close Savechanges:=True Close

Workbooks(“Workbook Name”).Close Savechanges:=False Close

Dim wb As Workbook
Set wb = Workbooks.Add Save
wb.Save

Dim wb As Workbook
Set wb = Workbooks.Add Save
wb.SaveAs Filename:="D:\test\Sample.xlsx"

ActiveWorkbook.Save Save

Workbooks(“Workbook Name”).SaveCopyAs([Filename]) SaveCopyAs

ActiveSheet.Name = "Name" Name

Worksheets("Sheet3").Copy Before:=Worksheets(1) Copy

Worksheets("Sheet3").Copy After:=Worksheets(1) Copy

Page 2 of 6
SYNTAX KEY WORK

Worksheets("Sheet3").Copy After:=Worksheets(Worksheets.Count) Copy

Worksheets(“Worksheet Name”).Activate Active

Worksheets(1).Activate Active

Sheets("worksheet name").Activate Active

Sheets(1).Activate Active

Worksheets(“Sheet Name”).Delete Delete

Worksheets(2).Delete Delete

Application.DisplayAlerts = False
Sheets("Sheet2").Delete Delete
Application.DisplayAlerts = True

worksheets(“sheet”).Visible = (False, true) Hide/ Unhide

.RemoveDuplicates Columns:=Array(1, 2), Header:=xlYes Remove


duplicate

Range(“B10″).Value =
Application.WorksheetFunction.Countif(Range(“A2:A8″), “>” & 50) Countif

marks = Application.WorksheetFunction.VLookup(student_id, myrange, Vlookup


3, False)
Set xRg = Worksheets("Sheet5").Range("A2:B8") List
Me.ComboBox1.List = xRg.Columns(1).Value validation
on error resume next Error

on error goto <label> Error

on error goto 0 Error

range(...).find("x").row Find

Page 3 of 6
EXPLAINATION

Chọn tất cả dữ liệu trong bảng.

Trả con trỏ về vị trí tại textbox mong muốn.

Thay thế cho Forms!tên Form!

Gán một chuỗi nhận dạng cho một đối tượng mà không ảnh hưởng đến bất
kỳ cài đặt thuộc tính nào khác của nó hoặc gây ra các tác dụng phụ
khác. Thuộc tính Thẻ hữu ích khi bạn cần kiểm tra danh tính của biểu
mẫu, báo cáo, phần hoặc điều khiển được chuyển thành biến cho một
quy trình.

Chọn các dữ liệu không trùng trong CSDL.

Chọn các DL trong CSDL có điều kiện.

Đạt được tất cả các điều kiện thì thực hiện.

Đạt được 1 trong các điều kiện thì thực hiện.

Chọn DL theo điều kiện giá trị.

Trả về một biến đối tượng kiểu Cơ sở dữ liệu đại diện cho cơ sở dữ
liệu hiện đang mở trong cửa sổ Microsoft Access.

Xác nhận các lệnh theo sau nó sẽ ghi đè giá trị cũ.

Chạy lại truy vấn mà biểu mẫu hoặc kiểm soát dựa trên đó.

The end row.

The end column.

Page 4 of 6
EXPLAINATION

Select the end row.

Make new work book.

Make new work sheet.

Active a workbooks.

Open a workbooks.

Close workbooks with Savechanges: = True, có nghĩa là nếu chúng ta


đã thực hiện bất kỳ thay đổi trong bảng tính thì nó sẽ lưu các thay
đổi.

Close workbooks with Savechanges: = False.

Save workbook lưu tại thư mục Documents.

Save workbook lưu tại thư mục "D:\test\" với tên file là
"Sample.xlsx".

mọi thay đổi của Workbook đang được kích hoạt sẽ được lưu lại.

Đôi khi bạn muốn lưu bảng tính với những thay đổi và bạn không muốn
sửa đổi bảng tính đã mở. VD:
ThisWorkbook.SaveCopyAs ThisWorkbook.Path & "\" & "ver1_" &
ThisWorkbook.Name

Name to work sheet.

Copy 1 worksheet to before the first worksheet.

Copy 1 worksheet to after the first worksheet.

Page 5 of 6
EXPLAINATION

Copy 1 worksheet to the end.

Active worksheet.

Active the first worksheet.

Active worksheet.

Active the first worksheet.

Delete a worksheet.

Delete the second worksheet.

Delete a worksheet without alert.

Ignore error

If any error then do label

End of ignored error

Find the row which has x in the range

Page 6 of 6

You might also like