variables
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Variables

Variables

resolvedResolved · Low Priority · Version 2003

replyReply Thu 29 Jan 2009, 16:46Delegate Phil said...

Phil has attended:
Excel VBA Intro Intermediate course

Variables

how do you declare a variable?

For upcoming training course dates see: Pricing & availability

replyReply Mon 2 Feb 2009, 09:41Trainer Carlos said...

RE: Variables

Hi Phil

A Variable is a name used to represent a value in VBA.

Variables are used to represent values that may change during the procedure and identify a unique location in memory.

The syntax used to declare a variable is

Dim/Public/Private VariableName [As type]. eg:

Public PivotSelection As Byte

Hope this helps

Carlos

Mon 9 Feb 2009: Automatically marked as resolved.

 

Please browse our web site to find out more about
advanced excel courses and other Microsoft training courses.

Excel tip:

Make macros work in newer versions of Excel

If you have created macros in Excel 97 or 2000 that you want to be able to use in 2002/XP or 2003, you may need to alter the macro security settings in the newer version of Excel you are using.

To do this, go to Tools - Options - Security.

Select Macro Security and change the security setting to Low.

Tick the boxes next to 'Trust Add-ins' and 'Trust Visual Basic' and click OK.

After you have restarted Windows, you should then be able to use your macros created in earlier versions of Excel.

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard