Page 270 - Excel Data Analysis
P. 270

15 537547 AppC.qxd  3/4/03  11:56 AM  Page 256







                    APPENDIX


                  VBA AND EXCEL EVENTS QUICK REFERENCE



                  VBA STATEMENTS QUICK REFERENCE


                     Legend:
                     Plain courier text = required          Italics = user-defined    | = or
                     [] = optional                          ...= list of items
                     File and Folder Handling
                      STATEMENT                    DESCRIPTION
                      ChDir path                   Changes to the specified folder location.
                      ChDrive drive                Changes to the specified drive.
                      Close [filenumber]           Closes a file opened using the Open statement.
                      FileCopy source, destination  Copies a source file to the specified destination.
                      Kill pathname                Deletes files from a disk. Use wildcards * for multiple characters and ? for single
                                                   characters.
                      Lock [#]filenumber[, recordrange]  Locks all or a portion of an open file to prevent access by other processes.
                      MkDir path                   Creates a new directory or folder.
                      Open pathname For mode       Opens the specified file to allow input/output operations.
                      [Access access] [lock] As
                      [#]filenumber [Len=reclength]
                      Print #filenumber[, outputlist]  Writes display-formatted data sequentially to a file.
                      Put [#]filenumber,           Writes data contained in a variable to a disk file.
                      [recnumber,] varname
                      Reset                        Closes all files opened using the Open statement.
                      RmDir path                   Removes the specified folder.
                      SetAttr pathname, attributes  Sets the attribute information for the specified file.
                      Unlock [#]filenumber[,       Unlocks a file to allow access by other processes.
                      recordrange]
                      Width #filenumber, width     Assigns the output line width for a file opened using the Open statement.
                      Write #filenumber[, outputlist]  Writes data to a sequential text file.
                     Interaction
                      STATEMENT                             DESCRIPTION
                      AppActivate title[, wait]             Activates an application window.
                      DeleteSetting appname, section[, key]  Deletes a section or key setting from an application's entry in the
                                                            Windows Registry.
                      SaveSetting appname, section, key, setting  Saves an application entry in the application's entry in the Windows
                                                            Registry.
                      SendKeys string[, wait]               Sends one or more keystrokes to the active window keyboard buffer,
                                                            as if they were typed on the keyboard.

                   256
                   256
   265   266   267   268   269   270   271   272   273   274   275