買這商品的人也買了...
-
$680$537 -
$980$774 -
$480$408 -
$690$587 -
$590$466 -
$1,590$1,511 -
$780$616 -
$750$638 -
$560$476 -
$1,024Microsoft Excel VBA Professional Projects
-
$290$247 -
$1,680$1,596 -
$480$379 -
$750$593 -
$590$460 -
$490$382 -
$450$356 -
$780$616 -
$890$703 -
$650$514 -
$650$507 -
$2,570$2,442 -
$880$695 -
$550$435 -
$550$435
商品描述
Microsoft Visual Basic for Applications (VBA) is a powerful development technology for customizing desktop applications and integrating them with existing data and systems, enabling customers to buy off-the-shelf software and customize it to meet their specific needs. This is a big cost-saving solution for most business who cannot afford to build programs from scratch. There are an estimated 65 million Excel users. Many are Excel power users, but few have figured out how to effectively use Excel VBA. This book teaches the skills necessary to use Microsoft VBA to customize the Excel spreadsheet. No prior programming knowledge is assumed. It takes a reader who has, perhaps, built a couple of macros from a standing start to a complete knowledge of the VBA language. Topics covered include: event programming, user forms, charts, pivot tables, Web queries, multi-dimensional arrays, classes, records, and collections, and more
Table of Contents:
Introduction.
Getting Results with VBA. What Is in This Book. A Brief History of Spreadsheets and Macros. The Future of VBA and Excel. Special Elements and Typographical Conventions. Next Steps.
I. FIRST STEPS UP THE VBA LEARNING CURVE.
The Power of Excel. Barriers to Entry. Knowing Your Tools-The Visual Basic Toolbar. Macro Security. Overview of Recording, Storing, and Running a Macro. Running a Macro. Understanding the Visual Basic Editor (VBE). Examining Code in the Programming Window. Running the Macro on Another Day Produces Undesired Results. Frustration. Next Steps: Learning VBA Is the Solution.
I Can't Understand This Code. Understanding the Parts of VBA "Speech". Is VBA Really This Hard? No! Examining Recorded Macro Code-Using the VB Editor and Help. Using Debugging Tools to Figure Out Recorded Code. The Ultimate Reference to All Objects, Methods, Properties. Five Easy Tips for Cleaning Up Recorded Code. Putting It All Together-Fixing the Recorded Code. Next Steps.
The Range Object. Using the Top-Left and Bottom-Right Corners of a Selection to Specify a Range. Referencing Ranges in Other Sheets. Referencing a Range Relative to Another Range. Using the Cells Property to Select a Range. Using the Offset Property to Refer to a Range. Using the Resize Property to Change the Size of a Range. Using the Columns and Rows Properties to Specify a Range. Using the Union Method to Join Multiple Ranges. Using the Intersect Method to Create a New Range from Overlapping Ranges. Using the IsEmpty Function to Check Whether a Cell Is Empty. Using the CurrentRegion Property to Quickly Select a Data Range. Using the Areas Collection to Return a Non-contiguous Range. Next Steps.
Creating User-Defined Functions. Useful Custom Excel Functions. Next Steps.
For…Next Loops. Do Loops. The VBA Loop: For Each. Next Steps.
Referring to Cells: A1 Versus R1C1 References. Switching Excel to Display R1C1 Style References. The Miracle of Excel Formulas. Explanation of R1C1 Reference Style. Conditional Formatting-R1C1 Required. Array Formulas Require Conditional Formatting. Next Steps.
Global Versus Local Names. Adding Names. Deleting Names. Types of Names. Hiding Names. Checking for the Existence of a Name. Next Steps.
Levels of Events. Using Events. Workbook Events. Worksheet Events. Chart Sheet Events. Application-Level Events. Next Steps.
User Interaction Methods. Creating a Userform. Calling and Hiding a Userform. Using Basic Form Controls. Using the Multipage Control to Combine Forms. Next Steps.
II. AUTOMATING EXCEL POWER IN VBA.
Overview. Embedded Charts Versus ChartSheets. Creating a Chart with VBA. Using Object Variables to Streamline Code. The Anatomy of a Chart. Table of Chart Types. Details of Various Chart Types. Interactive Charts. Exporting Charts as Images. Drawing with X-Y Charts. Custom Charts with VBA. Next Steps.
Advanced Filter Is Easier in VBA Than in Excel. Using Advanced Filter to Extract a Unique List of Values. Using Advanced Filter with Criteria Ranges. Using "Filter in Place" in Advanced Filter. The Real Workhorse: xlFilterCopy with All Records Instead of Unique Records Only. AutoFilters. Next Steps.
Versions. Creating a Vanilla Pivot Table in Excel Interface. Building a Pivot Table in Excel VBA. Revenue by Customer for a Product Line Manager. Handling Additional Annoyances. Product Profitability-Issues with Two or More Data Fields. Summarizing Date Fields with Grouping. Advanced Pivot Table Techniques. Sum, Average, Count, Min, Max, and More. Reporting Percentages. Next Steps.
Using VBA to Extend Excel. File Operations. Combining and Separating Workbooks. Working with Cell Comments. Utilities to Wow Your Clients. Techniques for VBA Pros. Cool Application. Next Steps.
Getting Data from the Web. Using Streaming Data. Using Application.OnTime to Periodically Analyze Data. Publishing Data to a Web Page. Next Steps.
What Is XML? Simple XML Rules. Universal File Format. XML as the New Universal File Format. The Alphabet Soup of XML. Using XML to Round-Trip a Workbook from Excel to HTML and Back. Next Steps.
Early Binding. Late Binding. Creating and Referencing Objects. Word's Objects. Next Steps.
III. TECHIE STUFF YOU WILL NEED TO PRODUCE APPLICATIONS FOR THE ADMINISTRATOR TO RUN.
Declare an Array. Fill an Array. Empty an Array. Arrays Can Make It Easier to Manipulate Data, But Is That All? Dynamic Arrays. Passing an Array. Next Steps.
Importing from Text Files. Writing Text Files. Next Steps.
ADO Versus DAO. The Tools of ADO. Adding a Record to the Database. Retrieving Records from the Database. Updating an Existing Record. Deleting Records via ADO. Summarizing Records via ADO. Other Utilities via ADO. Next Steps.
Inserting a Class Module. Trapping Application and Embedded Chart Events. Creating a Custom Object. Using a Custom Object. Using Property Let and Property Get to Control How Users Utilize Custom Objects. Collections. User-Defined Types (UDTs). Next Steps.
Using the UserForm Toolbar in the Design of Controls on UserForms. Controls and Collections. More UserForm Controls. Tabstrip. RefEdit. Modeless Userforms. Hyperlinks in Userforms. Adding Controls at Runtime. Using a Scrollbar as a Slider to Select Values. Adding Help Tips to Controls. Tab Order. Coloring the Active Control. Transparent Forms. Next Steps.
What Is the Windows API? Understanding an API Declaration. Using an API Declaration. API Examples. Finding More API Declarations. Next Steps.
What Happens When an Error Occurs. Basic Error Handling with the On Error GoTo Syntax. Generic Error Handlers. Train Your Clients. Errors While Developing Versus Errors Months Later. The Ills of Protecting Code. More Problems with Passwords. Errors Caused by Different Versions. Next Steps.
Creating a Custom Menu. Creating a Custom Toolbar. Other Ways to Run a Macro. Next Steps.
Characteristics of Standard Add-Ins. Converting an Excel Workbook to an Add-In. Having Your Client Install the Add-In. Using a Hidden Workbook as an Alternative to an Add-In. Next Steps.
About Tushar Mehta. Using Excel for More Than Number Crunching. The Solution. Implementing the Solution in Excel and VBA. Summary. Next Steps.
商品描述(中文翻譯)
Microsoft Visual Basic for Applications (VBA) 是一種強大的開發技術,用於自訂桌面應用程式並將其與現有數據和系統整合,使客戶能夠購買現成的軟體並根據其特定需求進行自訂。這對於大多數無法從零開始構建程式的企業來說,是一個巨大的成本節省解決方案。估計有 6500 萬名 Excel 使用者,其中許多人是 Excel 的高級使用者,但很少有人能有效地使用 Excel VBA。本書教授使用 Microsoft VBA 自訂 Excel 試算表所需的技能。不需要先前的程式設計知識。本書將讀者從可能只建立過幾個巨集的初學者,帶到對 VBA 語言的完整理解。涵蓋的主題包括:事件程式設計、使用者表單、圖表、樞紐分析表、網頁查詢、多維陣列、類別、記錄和集合等。
目錄:
引言。
使用 VBA 獲得成果。本書內容概述。試算表和巨集的簡史。VBA 和 Excel 的未來。特殊元素和排版慣例。下一步。
I. VBA 學習曲線的第一步。
1. 釋放 Excel 的力量與 VBA!
Excel 的力量。進入障礙。了解你的工具 - Visual Basic 工具列。巨集安全性。錄製、儲存和執行巨集的概述。執行巨集。理解 Visual Basic 編輯器 (VBE)。檢查程式碼的編程視窗。第二天執行巨集產生不期望的結果。挫折。下一步:學習 VBA 是解決方案。
2. 這聽起來像 BASIC,為什麼看起來不熟悉?
我無法理解這段程式碼。理解 VBA 的「語言」部分。VBA 真的這麼難嗎?不!檢查錄製的巨集程式碼 - 使用 VB 編輯器和幫助。使用除錯工具來理解錄製的程式碼。所有物件、方法、屬性的終極參考。清理錄製程式碼的五個簡單技巧。將所有內容整合 - 修正錄製的程式碼。下一步。
3. 引用範圍。
範圍物件。使用選擇的左上角和右下角來指定範圍。在其他工作表中引用範圍。相對於另一範圍引用範圍。使用 Cells 屬性選擇範圍。使用 Offset 屬性引用範圍。使用 Resize 屬性改變範圍的大小。使用 Columns 和 Rows 屬性指定範圍。使用 Union 方法連接多個範圍。使用 Intersect 方法從重疊範圍創建新範圍。使用 IsEmpty 函數檢查單元格是否為空。使用 CurrentRegion 屬性快速選擇數據範圍。使用 Areas 集合返回不相鄰的範圍。下一步。
4. 使用者定義函數。
創建使用者定義函數。有用的自訂 Excel 函數。下一步。
5. 迴圈。
For…Next 迴圈。Do 迴圈。VBA 迴圈:For Each。下一步。
6. R1C1 樣式公式。
引用單元格:A1 與 R1C1 引用。切換 Excel 顯示 R1C1 樣式引用。Excel 公式的奇蹟。R1C1 引用樣式的解釋。條件格式 - 需要 R1C1。陣列公式需要條件格式。下一步。
7. 名稱。
全域名稱與區域名稱。添加名稱。刪除名稱。名稱的類型。隱藏名稱。檢查名稱是否存在。下一步。
8. 事件程式設計。
事件的層級。使用事件。工作簿事件。工作表事件。圖表工作表事件。應用程式級事件。下一步。
9. 使用者表單 - 介紹。
用戶互動方法。創建使用者表單。調用和隱藏使用者表單。使用基本表單控制項。使用多頁控制項來組合表單。下一步。
II. 在 VBA 中自動化 Excel 的力量。
10. 圖表。
概述。嵌入圖表與圖表工作表。使用 VBA 創建圖表。使用物件變數簡化程式碼。圖表的結構。圖表類型表。各種圖表類型的詳細信息。互動圖表。將圖表導出為圖像。使用 X-Y 圖表繪圖。使用 VBA 創建自訂圖表。下一步。
11. 使用進階篩選進行數據挖掘。
在 VBA 中使用進階篩選比在 Excel 中更簡單。使用進階篩選提取唯一值列表。使用進階篩選與條件範圍。使用「就地篩選」的進階篩選。真正的工作馬:xlFilterCopy,包含所有記錄而不僅是唯一記錄。自動篩選。下一步。
12. 樞紐分析表。
版本。在 Excel 界面中創建基本樞紐分析表。在 Excel VBA 中構建樞紐分析表。針對產品線經理的客戶收入。處理其他煩惱。產品盈利能力 - 兩個或更多數據字段的問題。使用分組總結日期字段。進階樞紐分析表技術。總和、平均、計數、最小、最大等。報告百分比。下一步。
13. Excel 的力量。
使用 VBA 擴展 Excel。文件操作。合併和分離工作簿。處理單元格註解。讓客戶驚豔的工具。VBA 專家的技術。酷的應用。下一步。
14. 從網路讀取和寫入。
從網路獲取數據。使用串流數據。使用 Application.OnTime 定期分析數據。將數據發佈到網頁。下一步。
15. Excel 2003 專業版中的 XML。
什麼是 XML?簡單的 XML 規則。通用文件格式。XML 作為新的通用文件格式。XML 的字母湯。使用 XML 將工作簿從 Excel 轉換為 HTML 然後再回來。下一步。
16. 自動化 Word。
早期綁定。晚期綁定。創建和引用物件。Word 的物件。下一步。
III. 你需要的技術內容,以便為管理員運行的應用程式製作。
17. 陣列。
聲明一個陣列。填充陣列。清空陣列。陣列可以使數據操作更容易,但這就是全部嗎?動態陣列。傳遞陣列。下一步。
18. 文本文件處理。
從文本文件導入。寫入文本文件。下一步。
19. 使用 Access 作為後端以增強多用戶對數據的訪問。
ADO 與 DAO。ADO 的工具。向數據庫添加記錄。從數據庫檢索記錄。更新現有記錄。通過 ADO 刪除記錄。通過 ADO 總結記錄。其他 ADO 工具。下一步。
20. 創建類別、記錄和集合。
插入類別模組。捕獲應用程式和嵌入圖表事件。創建自訂物件。使用自訂物件。使用 Property Let 和 Property Get 控制用戶如何使用自訂物件。集合。使用者定義類型 (UDTs)。下一步。
21. 進階使用者表單技術。
在使用者表單的控制項設計中使用使用者表單工具列。控制項和集合。更多使用者表單控制項。選項卡條。RefEdit。無模式使用者表單。使用者表單中的超連結。在運行時添加控制項。使用滾動條作為滑塊選擇值。為控制項添加幫助提示。選項卡順序。為活動控制項著色。透明表單。下一步。
22. Windows 應用程式編程介面 (API)。
什麼是 Windows API?理解 API 聲明。使用 API 聲明。API 範例。查找更多 API 聲明。下一步。
23. 處理錯誤。
當錯誤發生時會發生什麼。使用 On Error GoTo 語法的基本錯誤處理。通用錯誤處理器。訓練你的客戶。開發過程中的錯誤與幾個月後的錯誤。保護程式碼的弊端。密碼的更多問題。不同版本造成的錯誤。下一步。
24. 使用自訂菜單運行巨集。
創建自訂菜單。創建自訂工具列。運行巨集的其他方法。下一步。
25. 附加元件。
標準附加元件的特徵。將 Excel 工作簿轉換為附加元件。讓客戶安裝附加元件。使用隱藏的工作簿作為附加元件的替代方案。下一步。
26. 案例研究:設計一個 Excel 應用程式。
關於 Tushar Mehta。使用 Excel 進行不僅僅是數字計算。解決方案。在 Excel 和 VBA 中實施解決方案。總結。下一步。
索引