Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default passing a parameter to an excel macro from a form control

Has anyone managed to pass a parameter to a macro from a form checkbox using
'Assign Macros'?
Alternatively, can I reference the control that called the macro in the
macro code, without knowing its name? (as in 'me.' or something like that)
I want several controls to run the same macro passing it one parameter.
Size limitations (plus sloppy design!) precluse me from repeating the macro.
I much prefer to use form controls in this instance as I'm copying them
programmatically.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default passing a parameter to an excel macro from a form control

If it is really necessary to use a Form checkbox instead of a Controls check
box (which would allow you to use its properties), you could make an
intermediate macro. Instead of having the checkbox call the macro that needs
a parameter, write a quick macro that calls the other macro and passes a
parameter to it. This would also allow you to reference the control (or the
macro) that called the main macro.

HTH,
Matthew Pfluger

"Sian" wrote:

Has anyone managed to pass a parameter to a macro from a form checkbox using
'Assign Macros'?
Alternatively, can I reference the control that called the macro in the
macro code, without knowing its name? (as in 'me.' or something like that)
I want several controls to run the same macro passing it one parameter.
Size limitations (plus sloppy design!) precluse me from repeating the macro.
I much prefer to use form controls in this instance as I'm copying them
programmatically.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default passing a parameter to an excel macro from a form control

Thank you Matthew, that was helpful - that did occur to me but I thought I
might be missing something. I think I'll find another approach altogether...!
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 string as macro parameter kmbarz Excel Programming 1 November 20th 06 05:31 PM
PASSING PARAMETER FORM DOS script to Excel BruceWyne Excel Programming 4 November 3rd 06 03:02 AM
VB macro - Nested Calls ( Parameter Passing ) Deepak Excel Programming 1 August 3rd 05 04:51 PM
passing control value from one form to another form mark kubicki Excel Programming 1 April 3rd 04 01:27 AM
Passing a parameter to Excel keepitcool Excel Programming 3 August 13th 03 03:57 AM


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

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"