... lỗi - Errors trapping
1. Private Sub Form_Error(DataErr As Integer, Response As Integer)
2. Select Case DataErr
3. Case 2237
4. Call MsgBox("Sinh vien khong co trong tep." & _
5. "Hay ... Response = acDataErrDisplay
15. End Select
16. End Sub
40
Ví dụ 2: Bẫy lỗi - Errors trapping
Ví dụ 2: Bẫy lỗi - Errors trapping
12
B.3 Events
B.3 Events
Event = sự kiện
(Oxford Dictionary)
VBA ... tham số cao
Microsoft VisualBasicfor Applications
Created & Presented by:
TBL Group
13
C.1 Chương trình con-Procedure
C.1 Chương trình con-Procedure
Đoạn chứa mã chương trình
Có thể...
... vbOnlyOK OK
1 / vbOKCancel OK, Cancel
2 / vbAbortRetryIgnore Abort, Retry, Ignore
3 / vbYesNoCancel Yes, No, Cancel
4 / vbYesNo Yes, No
5 / vbRetryCancel Retry, Cancel
Phạm Thị Kim Ngoan 27
IV. Các ...
vbOkCancel+vbInformation, “Kết quả”)= vbOk THEN
Phạm Thị Kim Ngoan 38
I. Các cấu trúc điều khiển
2. Cấu trúc lặp:
a. FOR NEXT
Cú pháp:
FOR biến_đếm=giá trị đầu TO giá trị cuối [STEP bước ... Giới thiệu chung
Visual Basic là ngôn ngữ lập trình dùng để r ng buộc các đối
tượng trong ứng dụng với nhau thành một hệ thống hợp nhất.
Các chương trình của VBA (Visual Basicfor Application)...
... Guide Tutorial: Learning to Program Amos with VisualBasic
ã
57
7. Run the program
To run the program, select
Run
from the main menu, and then
Start with F
ull
Compile
:
When the program has ...
Sem.Dir & "Tutorial\Hamilton.dbf"
Amos 4.0 User’s Guide Tutorial: Learning to Program Amos with VisualBasic
ã
45
Tutorial: Learning to
Program Amos with Visual
Basic
Purpose
You ... preceding figure. When the following pop-up
menu appears, select
Remove Form1
:
Amos 4.0 User’s Guide Tutorial: Learning to Program Amos with VisualBasic
ã
51
4. Create a code window for...
... -29889 19228 - 163 65 ??
7
8
9 2 3 10 -54 60 75 ?
10 -43 95 1 254 1 162 - 252 70 -238 56 163 77 ??
11
12
13 200 -43 -57 - 16 -63 -29 ?
Resp = Resp + ", " + Chu
Else
Resp = Resp + Chu
End ...
Lên tool, Macro, VBA-Editor để sang môi trờng lập trình của Excel
Trong môi trờng lập trình, lên menu insert, chọn module
Nhập các chơng trình sau
1. Trên phần General Declaration đa vào ... định dạng
2. Trên thanh công c
ụ toolbar, chọn
Tools, Macro, ch
ọn Record New
Macro.
3. H
ộp hội thoại Record New Macro
xu
ất hiện. Trong hộp Macro Name,
nhập tên c
ủa Macro cần thu, ví...
...
Review 52
Lab 1.1: Creating Windows Forms 54
Module 1: Introducing
Windows Forms
Module 1: Introducing Windows Forms 5
(continued)
Feature/criterion Windows Forms Web Forms ...
suitable forapplications that
require extreme throughput
from the user end or for those
with high-volume transactions.
Similarly, Web Forms
applications may not be
suitable for database
applications ... Report Viewer to display all order history for a
given employee. Order information is displayed by CustomerName and by
OrderDate. You can also click each order in the report to display order...
... Server, Microsoft
Visual Basic, Active Directory, ActiveX, PowerPoint, Visual Basic, Visual Studio, and Windows
Media are either registered trademarks or trademarks of Microsoft Corporation in the ... No part of this document may
be reproduced or transmitted in any form or by any means, electronic or mechanical, for any
purpose, without the express written permission of Microsoft Corporation. ... the course, audience,
suggested prerequisites, and course objectives.
Description
This course will teach Microsoft VisualBasic programmers how to build n-tier
client/server solutions for Windows...
... may
be reproduced or transmitted in any form or by any means, electronic or mechanical, for any
purpose, without the express written permission of Microsoft Corporation. If, however, your only ... Visual Basic, Visual InterDev, and Visual Studio are either registered trademarks or
trademarks of Microsoft Corporation in the U.S.A. and/or other countries.
The names of companies, products, ...
Set up the hardware
1. Set up the hardware according to the manufacturer’s instructions. (Refer to
the hardware requirements.)
2. Configure the hard disk as follows:
ã Format drive C with...
... filSource
Flat scroll bar fsb fsbMove
Form frm frmEntry
Frame fra fraLanguage
Gauge gau gauStatus
Graph gra graRevenue
Grid grd grdPrices
Hierarchical flexgrid flex flexOrders
Horizontal scroll bar ... 41
5 Nh p môn l p trìnhậ ậ 43
5. 1 Chu n l p trình (Coding convention)ẩ ậ 43
5. 1.1 Coding conventions 43
5. 1.2 Form design standard 48
5. 1.3 Report design standard (for Crystal Report) 51
5. 1.4 ... ợ ủ 1 75
13 .5. 4 S d ng thu c tính Bookmark đ ghi nh v trí trong m t Recordsetử ụ ộ ể ớ ị ộ 1 76
13 .5. 5 s d ng t p h p Errors và đ i t ng Error đ x lý l iử ụ ậ ợ ố ượ ể ử ỗ 1 76
FPT Software Solution...
... Result as Long
Result = 303 45 * 100 ' sẽ bị overflow error
' Hãy viết như sau:
Dim Result as Long
Result = 303 45
Result = Result * 100 ' không bị overflow error
Ðể tính ... ta có digit " ;5& quot;
Text String trong VB6 dùng một byte cho mỗi ASCII character. Sau nầy khi ta lập trình trong VB7,
một character có thể là Unicode character, trong trường hợp đó nó được ... Functions Val, CInt(ra Integer) hay
CSng(ra Single). Ngược lại, để convert từ internal number ra Text String ta có thể dùng Function
CStr.
Dollars = " ;50 0"
ExchangeRatePerDollar = "7000"...