SlideServe
Menu
Préférences
© SlideServe · v2026

Excel Macro VBA Overview

daire avatar
13 diapositives · 388 Views · Jul 20, 2014

Excel Macro VBA Overview. Kevin Fujinami 4/26/2013. What are Excel Macros?. S tep-by-step procedures written in Visual Basic Making code Recording macros Writing code from scratch. Components of VBA Code. Option Explicit Sub UnhideSheets () ‘ Declaring a variable Dim i As Long

Excel Macro VBA Overview - slide 1
01 / 13Excel Macro VBA Overview
1 / 17

Télécharger la présentation

Excel Macro VBA Overview
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Excel Macro VBA Overview Kevin Fujinami 4/26/2013

  2. What are Excel Macros? • Step-by-step procedures written in Visual Basic • Making code • Recording macros • Writing code from scratch

  3. Components of VBA Code Option Explicit Sub UnhideSheets() ‘ Declaring a variable Dim i As Long ‘ Loop that makes each worksheet visible For i = 1 To Worksheets.Count Worksheets(i).Visible = True Next i End Sub

  4. Setting up Excel for VBA • Developer button in ribbon • Saving files as .xlsm instead of .xlsx • Security

  5. Adding Developer to Excel Menu

  6. Security Warning

  7. VBA Editor

  8. Writing a macro from scratch • Coloring cells based on value • Unhidingworksheets • Pivot table macro

  9. Running Macros • Run from VBA window • Select worksheet before running • Adding a button to Excel Menu

  10. Troubleshoot VBA coding • F8 – Stepping through code • Add watch to view value of variables • Beeps • Start/End time stamps

  11. Code Snippets • Option Explicit • Find last row in table • Make copy of worksheet then run VBA on that copy • Speeding up macro by turning off screen update • Time Stamps • Beeping when done

  12. Tips for becoming proficient • Learn basic programming fundamentals • Read books to discover what Excel VBA functions are available • Google for answers • Write tests for quality assurance • Comment your code

  13. Resources • Books • VBA and Macros: Microsoft Excel 2010 (MrExcel Library) ISBN-13: 978-0789743145 • Online resources • http://www.mrexcel.com/ • http://ozgrid.com • http://msdn.microsoft.com/en-us/library/office/ee814737(v=office.14).aspx