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

excel.advanced.course - change objects property

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » excel.advanced.course - Change an Object's Property

excel.advanced.course - Change an Object's Property

ResolvedVersion Standard

Neil has attended:
Excel VBA Intro Intermediate course

Change an Object's Property

When can I just use code like:

Object = Value

and when do I need to use code like:

Set Object = Value

I'm not sure which applies in which case. Thanks!

RE: Change an Object's Property

Hi Neil

Thank you for your question

Simply put when you a assigning a value to an excel object then you must use the set command. So if you are naming a workbook, worksheet, range or other similar object use the set command.

however, if you are assigning a value to a simple variable then just use the variable = value syntax

Regards

Stephen

 

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:

Create own ribbon tab - Excel 2010

a. In Excel click on the File tab
b. Select Options from left hand side
c. Choose the Customize Ribbon section
d. Click the New Tab button (below the list of tabs on the right hand side of the dialog box)
e. Select the New Tab (Custom) and enter a name, by clicking the Rename button (below the list of tabs on the right hand side of the dialog box)
f. Select the New Group (Custom) and enter a name, by clicking the Rename button (below the list of tabs on the right hand side of the dialog box)
g. Add commands to your tab and group by locating them on the list on the right hand side (remembering that you can change the list using the drop down box at the top of the list of commands) and clicking the Add button between the two panes to add them to your tab and group
h. You can rearrange the commands in your group, the groups on any tab or the tabs, using the up and down arrow buttons beside the list of tabs.
i. Click OK to apply your changes

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.13 secs.