Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default passing a range to a user defined function using a form

Is it possible to use a form created in vbe to pass a
range to a function. For example, on many Excel default
forms such as the pivot table wizard, a field will accept
a range which is ultimately passed on to a function. How
is that done? I want to use to supply the input range on
a form I define. What control and how do I do this.

Thanks in advance for any help!

Dave

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default passing a range to a user defined function using a form

You're looking for the RefEdit control.

Beware, this control has quirks.

I've found it very difficult to set breakpoints an debug.
If you get an error in an event of the refedit, the form bombs.

Once you get used to the quirks, I've found refedit control to be very
handy.

One of the things I like to do it simplify the Range it sets though. Its
like the "external" way of referring to a range. eg. Sheet1!$A$1

I like to check if it's a valid range and if it is and it's on the
activesheet, then simply refer to it as $A$1. I do the checking in the _Exit
event of the RefEdit control.


"davek" wrote in message
...
Is it possible to use a form created in vbe to pass a
range to a function. For example, on many Excel default
forms such as the pivot table wizard, a field will accept
a range which is ultimately passed on to a function. How
is that done? I want to use to supply the input range on
a form I define. What control and how do I do this.

Thanks in advance for any help!

Dave



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
User-defined range for graph royend Excel Discussion (Misc queries) 3 September 4th 07 09:11 AM
Passing a range to a user defined function Gary Nelson Excel Discussion (Misc queries) 1 July 19th 07 04:22 PM
passing arrays to user defined functions ramki Excel Worksheet Functions 2 February 15th 06 08:34 AM
Passing an Array of User-Defined Type to an Argument of a Function Tushar Mehta[_6_] Excel Programming 0 August 17th 03 06:43 PM
Passing Text from User Form to Spreadsheet Betsy[_2_] Excel Programming 1 August 6th 03 02:33 AM


All times are GMT +1. The time now is 09:20 PM.

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

About Us

"It's about Microsoft Excel"