VBA For Dummies

VBA helps you get the upper hand with your computer but giving you the ability to dig into programming. To do this, you need to be familiar with VBA functions and data types, and some keyboard shortcuts can make your job even easier.






>


>


VBA Keyboard Shortcuts


If you’re using VBA to streamline your Windows programs and operations, making use of the shortcut keys in the following list can help you streamline even more quickly and easily.































































PressTo Do ThisPressTo Do This
Alt+F11Open the VBA editorF1Get help on any selected item
Alt+F8Display a list of macrosF2Display the Object Browser window
Ctrl+BreakPerform an emergency stop of the programF4Display the Properties window
Ctrl+GDisplay the Immediate windowF5Start the program
Ctrl+IList the quick information for the selected elementF7Display the Code window after selecting a form or control
Ctrl+JList the properties and methods for an objectF9Add a breakpoint
Ctrl+RDisplay Project ExplorerShift+F7Display the form that corresponds to the active Code
window
Ctrl+Shift+IList the parameter information for the selected elementShift+F9Add a quick watch for the highlighted text
Ctrl+Shift+JList the constants associated with an enumerationCtrl+TabMove to the next Code or UserForm window




>



>


>


Common VBA Functions


VBA helps you dig into your Windows programming. The VBA functions in the following list are ones used most often or that have proven to be quite helpful:











































Use This FunctionTo Do This
Asc, AscB, or AscWConvert a character into its ASCII, DBCS, or Unicode numeric
value
Chr, ChrB, or ChrWConvert a number into its ASCII, DBCS, or Unicode
character
CStrConvert any expression, including any supported data type, into
a string
CVErrCreate a user-defined error number for your program
FormatChange an enumeration or other expression into formatted
text
InputBoxGet a single input from the program user
MsgBoxDisplay a short message box onscreen
Str, Format, or CStrConvert a number into a string
Val, CByte, CCur, CDbl, CDec, CInt, CLng, or CSngConvert a string into a number




>



>


>


Standard VBA Data Types


VBA works with a variety of data types to help you make adjustments to Windows programs. The following table shows the standard VBA data types, how big they are and describes their functions:


image0.jpg



>






>
dummies


Source:http://www.dummies.com/how-to/content/vba-for-dummies-cheat-sheet.html

No comments:

Post a Comment