Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Dynamic macro parameters

When calling an add-in function from a worksheet, is
there a way to make the parameter change when a row is
inserted or deleted? In other words, I have a function
that receives an argument that is a row number. If the
row number changes, I want my argument to automatically
change. The built-in functions do this, but I have not
been able to figure out how to make my functions do
this. If I use Row(A37) as the argument, it works great,
however, I only want to pass the row number not use a
built-in function as a filter.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Dynamic macro parameters

Hi
the function parameter will only change if you use a reference as
parameter. e.g.
your_function(A1)
or
your_function(ROW(1:1))

no chance with
your_function(1)
as Excel does not know that your '1' represents a row number


--
Regards
Frank Kabel
Frankfurt, Germany


Derek wrote:
When calling an add-in function from a worksheet, is
there a way to make the parameter change when a row is
inserted or deleted? In other words, I have a function
that receives an argument that is a row number. If the
row number changes, I want my argument to automatically
change. The built-in functions do this, but I have not
been able to figure out how to make my functions do
this. If I use Row(A37) as the argument, it works great,
however, I only want to pass the row number not use a
built-in function as a filter.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Dynamic macro parameters

Also there is no need to pass the row number. Pass the cell or row as a
range and extract the row number in the add-in

... = rng.Row

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Frank Kabel" wrote in message
...
Hi
the function parameter will only change if you use a reference as
parameter. e.g.
your_function(A1)
or
your_function(ROW(1:1))

no chance with
your_function(1)
as Excel does not know that your '1' represents a row number


--
Regards
Frank Kabel
Frankfurt, Germany


Derek wrote:
When calling an add-in function from a worksheet, is
there a way to make the parameter change when a row is
inserted or deleted? In other words, I have a function
that receives an argument that is a row number. If the
row number changes, I want my argument to automatically
change. The built-in functions do this, but I have not
been able to figure out how to make my functions do
this. If I use Row(A37) as the argument, it works great,
however, I only want to pass the row number not use a
built-in function as a filter.




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
Dynamic Parameters in Excel Cubes Erwin Excel Discussion (Misc queries) 2 April 16th 09 02:56 PM
Newbe trying to do Dynamic Parameters from a Worksheet Sean Cooper Excel Discussion (Misc queries) 0 January 22nd 07 02:56 PM
Dynamic Macro Input Craig[_9_] Excel Programming 3 November 10th 03 08:55 PM
Dynamic Filename From Macro Craig[_9_] Excel Programming 1 November 6th 03 06:36 PM
Command line parameters into a macro Donemowe Excel Programming 3 August 6th 03 09:12 AM


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