Common VBA Functions

Part of the VBA For Dummies Cheat Sheet

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 Function To Do This
Asc, AscB, or AscW Convert a character into its ASCII, DBCS, or Unicode numeric value
Chr, ChrB, or ChrW Convert a number into its ASCII, DBCS, or Unicode character
CStr Convert any expression, including any supported data type, into a string
CVErr Create a user-defined error number for your program
Format Change an enumeration or other expression into formatted text
InputBox Get a single input from the program user
MsgBox Display a short message box onscreen
Str, Format, or CStr Convert a number into a string
Val, CByte, CCur, CDbl, CDec, CInt, CLng, or CSng Convert a string into a number
  • Add a Comment
  • Print
  • Share
blog comments powered by Disqus

SERIES
VBA For Dummies Cheat Sheet

Advertisement

Inside Dummies.com

Dummies.com Sweepstakes

Win $500. Easy.