LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
Jeff
 
Posts: n/a
Default Using "Set" variable

I was looking over the "Set" variable in the help.

It gave the example:

Dim YourObject, MyObject, MyStr
Set MyObject = YourObject ' Assign object reference.
' MyObject and YourObject refer to the same object.
YourObject.Text = "Hello World" ' Initialize property.
MyStr = MyObject.Text ' Returns "Hello World".
' Discontinue association. MyObject no longer refers to YourObject.
Set MyObject = Nothing ' Release the object.

When should you use this? Does it have any advantage over just assigning
MyObject = "Hello World"

Thanks

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Aling multiple sets of data by header column MarkusO Excel Discussion (Misc queries) 2 April 12th 06 07:29 PM
Variable Names in Formulas Paulo Excel Discussion (Misc queries) 2 March 29th 06 01:16 PM
variable height variable width stacked bar charts ambthiru Charts and Charting in Excel 3 January 18th 06 11:41 PM
object variable or with block variable not set Diego Excel Discussion (Misc queries) 1 August 9th 05 02:46 PM
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? Daniel Excel Worksheet Functions 1 July 9th 05 03:05 AM


All times are GMT +1. The time now is 08:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"