Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

variables

ResolvedVersion 2003

Dean has attended:
Excel VBA Intro Intermediate course

Variables

What is the "SET" command used for when using variables?

Thanks

RE: Variables

Hi Dean

Thank you for your question

The set command is used when allocating a value to an object variable. There are two types of variable. Simple value variables such as strings or integers, take a single value and those values can be allocated without a set command.

For example

strName = "Fred"

Object variables can be set to represent real objects and can then be used to set various propeties of the object

Hence

SET SheetVar = Activesheet


Regards

Stephen

Fri 27 Mar 2009: Automatically marked as resolved.

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Separate the year from a date

To separate the year from a date use the =year() function, eg a date is in cell A1 and in A2 you wish to display the year enter the function =year(A1)

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.