excel.advanced.course - change objects property

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

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

resolvedResolved · Low Priority · Version 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:

Transpose text

You can transpose any range of cells, turning the columns into rows and the rows into columns. Just follow these steps:

Select the range.

Click the Copy button on the Standard toolbar to copy it to the Clipboard.

Select a cell outside of the range you copied.

Select Paste Special from the Edit menu.

In the Paste Special dialog box, click Transpose, then OK.

View all Excel hints and tips


Server loaded in 0.08 secs.