ACIS 2504 - FINAL EXAM Q&A
ACIS 2504 - FINAL EXAM Q&A main reasons to use VBA - ANS-1. automation- to automate commonly used tasks 2. to create a user interface is it easy to undo tasks run by VBA script? - ANS-it is NOT easy to undo tasks because the undo button is NOT AVAILABLE once the VBA script has been executed procedures / macros - ANS-paragraphs of executable code modules - ANS-pages where the individual procedures are written command - ANS-word or phrase objects - ANS-nouns property - ANS-adjectives (descriptions) methods - ANS-verbs (actions)- like delete, select, copy, value functions - ANS-like Excel's max, min, offset, etc. syntax - ANS-programming languages have a ____ - similar to grammar - which dictates how we write and structure our code sentences - ANS-we write ____ by manipulating objects used methods or properties (using verbs and adjectives) ex. Range("A1").Copy = copy the value in cell A1 Range("A2:B2").Select = select the cells A2:B2 Range("A3").Value = 4 = put the value 4 in cell A3 syntax to declare a variable and set its data type - ANS-declare: Dim VariableName as Variable type ~must use Dim~ exDim City as String (declaring city as a string of words) Dim Kevin as Integer (declaring Kevin as an integer) variable types - ANS-1. Boolean 2. Double 3. Integer 4. String 5. Range 6. Variant Boolean - ANS-True/False logical tests, NOT text Double - ANS-numbers with decimal places Integer - ANS-whole numbers String - ANS-text Range - ANS-group of cells Variant - ANS-any value writing to a spreadsheet - ANS-Range ("A2"). Value = "ItemCost" -"ItemCost would be the text placed in cell A2 *EQUAL AT THE END WITH QUOTES* reading from a spreadsheet - ANS-ItemCost = Range("A2"). Value
Document information
- Uploaded on
- January 13, 2024
- Number of pages
- 11
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers