实例介绍
OFFICE VBA 相關技術,適合使用者利用VBA開發OFFICE相關程序
office VBA: Macros You Can Use Today Office VBA: Macros You Can Use Today Copyright: c 2006 Holy Macro! Books. All Rights Reserved Authors: Juan Pablo gonzalez, Cindy Meister, Suat Ozgur, Bill Dilworth, and Nico Altin Publisher: bill Jelen Project Manager Anne Troy Art Director: Scott pierson Technical Editor and Pre Press: Linda delonais Cover Design: Shannon Mattiza, 6'4 Productions Published by: Holy macro! Books, 13386 Judy, Uniontown OH 44685 Distributed by: Independent Publishers group SBN:978-1932802-53-5 LccN:2005921880 First Printing: December 2005. Printed in USa All brand names and product names used in this book are trade names, service marks trademarks or registered trademarks of their respective owners Table of contents Table of Contents Foreword about the authors and contributors.t..c Juan pablo gonzalez Cindy meister Suat Ozgur Bill dilworth Nico altin Contributors Introduction 1 What is vba? Save time Take Advantage of UserForms Develop User-defined Functions Enjoy security How to use this book∴ 3 Using the procedures…… Understanding Code Comments Inserting Paragraph Returns in Code Using menu commands 4 Identifying Procedure Components ng Sample Fil Backup your Files! .5 Version Compatibility .5 ntroducing the visual basic edito ,,7 Accessing Visual Basic Editor(VBE) Touring the VBE Toolbar... Setting VBE Options 11 ng Project E Understanding vba project 13 king with Module 14 Using the Main Code Window Protecting Your Projects 18 Exce Procedures 19 Printing All Files..... Saving a Workbook as Today's date 21 Highlighting Duplicates Within a Range 23 Office VBA: Macros You Can Use Today page I Table of contents ng Worksheets 25 Generating a Unique List. 27 Using autoFilter on a Protected Sheet 30 Deleting rows Based on criteria Checking Whether or Not a File Exists Removing Hyperlinks 36 Applying sUM/ CounT by Color 37 Using More Than Three Conditional Formats 40 Providing a Calendar to Choose Dates for Input 42 Restricting Text BoX Entry to Numbers 45 Running a Macro When a Cell Changes 47 Forcing the Use of a Custom Print Procedure 49 Restricting the User to a portion of the worksheet Copying a Workbook with Macros Removed 52 Inserting Empty Rows in a Range....... 54 Creating a custom Toolbar Creating a Table of Contents of a Workbook 60 Changing the Case of Text 62 Creating a photo album 64 Deleting the Empty Rows in a Range 67 Creating a List of Files That Reside in a Directory......... ∴69 Forcing the User to Enable Macros 73 Finding and Replacing a String in All Open Workbooks Converting data to a Tabular Format…… AutoNumbering Invoices and other Workbooks Comparing Columns Using Various Criteria.…… 80 Deleting the Contents of Unlocked Cells 83 Hiding All Standard Toolbars Except Your Own ∴85 Creating a PPT Presentation from a Pivot chart Saving a Backup Copy of a Workbook …93 Importing Your Contacts from Outlook E-mailing from EXcel with Outlook 99 Printing a User Form.. 102 Importing and Formatting a Text File... ∴105 Extracting Numbers from a Text String Finding and Deleting Erroneously Named Ranges 111 Logging Actions When a Cell Changes Synchronizing Page Fields of Pivot Tables 116 page Office VBA: Macros You Can Use Today Table of contents Word procedures.rrww119 Applying Your Favorite Bullet/Number Format Finding and Replacing in Multiple Documents…… 122 Highlighting a Selection 126 Highlighting a Selection in Word 2002/XP. 127 Removing All Highlighting 129 Inserting AutoText with No Formatting Updating All Fields 131 Setting Hyperlinks on Index Entries 132 Displaying a Number in Millions as Text 38 Copying nested Field Codes as Text…… 141 Converting AutoNumbered Text into Normal Text.... 144 Reverse Numbering 44 Tables: Changing the tab direction 146 Tables: Suppressing New Rows When Tabbing ... Tables: Formatting Numbers in a selection 149 Tables: Copying Formulas 151 Using Calendar Wizard 157 Formatting Your Calenda 163 Inserting a Picture with Caption …164 Making Changes… 168 Associating a Picture with a Page Forms: Suppressing New Paragraphs in Form Fields 175 Forms: Formatting Text Input in Form Fields g other Types of Formatting 82 Forms: Inserting a New Table Row 183 Forms: Deleting a Table Roy 189 Forms: Placing a Picture in a Protected Form 193 Mail Merge: Using a Relative Path for Data Source. 195 Mail Merge: Displaying the Mail merge Interface 198 Mail Merge: Creating a User-Friendly List of Fields 200 Mail Merge: Making Placecards Using WordArt 203 Mail Merge: Creating a one-to-Many List 205 Mail Merge: Merging with a Char 215 Transferring a Selection to a New Document…,… 225 Splitting a document into Multiple Files .230 Creating a Folder Tree Menu.... 236 Changing Custom Dictionaries On-the-Fly 245 atting spelling Errors for Printing 249 Office VBA: Macros You Can Use Today page ll/ Table of contents Entering Data Easily Using a Custom Dialog Box ∴254 Creating a Bookmark from a Selection 260 Making Bookmarks Visible…… ∴264 Forcing the User to Enable Macro 265 Generating the document Using VBA.…… …265 Using Forms Protection 267 Macros in Files opened by code 267 outlook procedures .269 Creating control Buttons 269 Saving E-mail Attachments in a Specified Folder 271 Creating a Contacts Database 274 Sending a Web Page as the Body of an E-mail Message 279 Sending a Message Individually to Multiple Recipients 282 Sending daily attachments to Certain Recipients 287 Creating Reminders automatically 290 Creating Task Items Automatically in Outlook 294 Special: Outlook Security 300 Auto Replying to Selected E-mail Messages. 301 Remote Control with Outlook E-mail Message 302 Power Point procedures 305 Inserting a Predefined Number of slides Manipulating AutoShapes... 306 Grabbing All Text Moving Shapes and Graphics During Presentation 310 Making a Random Jump to Another Slide 313 Random madness Sending Word outline to Notes Section of Power Point .316 Wrapping Text to the Next slide. 319 Saving the show Point 321 Personalizing a presentation 322 Creating a New presentation 324 Access procedures 327 Splitting Names 327 Designing Consistent Forms 331 Triggering a New Form Based on a Subform Selection 334 Selecting and Filtering with Cascading Combo Boxes ∴337 E-mailing a Selection… 342 Making a Rolodex-type Selection Listbox .346 pageⅳ Office VBA: Macros You Can Use Today Table of contents Validating data 350 Moving rows Between Listboxes .353 Moving rows in Listboxes 355 Creating a Dynamic Crosstab Report 357 Generating Periodic Reports 359 Creating Controlled Numbers 361 Making a Wizard with Tabbed Control 363 combinedProcedures∴367 Transferring charts From Excel to PowerPoint 367 Saving Word form data to an Excel Spreadsheet 368 Filling a Word combo Box with Data from Excel….…… 371 Transferring data from E-mail attachments to Excel 378 Creating Word Labels from an Excel Recipient List 382 Creating custom Mail merge Using data in Excel Worksheet 389 Using Calendar Control for Office Applicatio 391 Appendix a. Opening and Using the visual Basic Editor..... 403 ng the Code obj 404 Inserting a Module.…,… 406 nserting a UserForm 407 Opening Worksheet Objects(Excel) 410 Opening thisWorkbook object( Excel),……,……… ∴412 Opening This Document Objects(Word Opening Thisoutlook Session Objects(Outlook 413 Opening Slide objects( Powerpoint) 414 Access objects 415 Appendix B 417 Running a macro 417 Running a Macro Automatically 417 Running a Macro Manually 417 Running a Macro from a Toolbar Button 418 Running a Macro Using Shortcut Ke ndex 421 Office VBA: Macros You can Use Toda page Table of contents page vI Office VBA: Macros You Can Use Today 【实例截图】
【核心代码】
标签:
相关软件
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论