Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default Passing Excel Objects As Parameters

Hi MDW,

MDW wrote:
I see that we can pass Excel objects (ranges, worksheets, etc.)
around subs or functions as parameters. Is there any performance
impact to doing that? Is it more desirable to define things with a
global scope as an alternative?


I prefer passing references to Excel objects as opposed to using global or
module-level variables. It takes a bit more work upfront, but IMO it's
better in the long run. I wouldn't worry about a performance hit, as you're
not actually passing the object itself, just a reference to that object.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]

Reply
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
Passing parameters to a called add-in... Trevor[_4_] Excel Programming 1 June 11th 04 11:12 PM
Calling Procedures from another excel sheet by passing objects Thomas Auburn Excel Programming 0 May 5th 04 05:33 PM
Passing parameters WarrenR Excel Programming 4 February 28th 04 09:11 PM
Passing parameters Eleanor[_2_] Excel Programming 0 February 4th 04 05:21 PM
Passing parameters to UDF mbobro[_3_] Excel Programming 5 January 2nd 04 04:25 PM


All times are GMT +1. The time now is 09:01 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"