[mso] Re: Using IF to select Macro command to carry out? Possible?

  • From: "Robert Carneal" <carnealre@xxxxxxxxxxxx>
  • To: <mso@xxxxxxxxxxxxx>
  • Date: Tue, 17 May 2005 18:09:19 -0500

You are close. I want it to run each time the user clicks a button. <g> You
are good knowing what people want when they don't know how to clearly
express that in the first place!

Ok, I joined Dian's group, and went to the Files section, and click on "Code
Sample Files." I see three files listed,  is the first one the one you are
thinking of. It is called "Change event demo.xls" by a person with the same
first name as yours.

Thank you.

Robert
-----Original Message-----
From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx]On Behalf Of
Ray Blake
Sent: Tuesday, May 17, 2005 3:19 PM
To: mso@xxxxxxxxxxxxx
Subject: [mso] Re: Using IF to select Macro command to carry out? Possible?

No, you can't do this. If you think about it, the effect of this - if
you could do it - would be to run your macro every time the sheet
updates. If you want that to happen (unlikely!) you can trigger the
macro from the change/update event of the worksheet, but what's more
likely is that you want to run it only when the value in a certain cell
changes.

If you're in Dian's Yahoo Excel VBA group, there's a file sample
available on the group home page which shows exactly how this is done.
All you'll need to do is build in a Select Case structure to trigger the
right macro.

Ray

------------------------------------
GR Business Process Solutions
Ray Blake
Head of Software Design
ray@xxxxxxxxx
Braedon
Newell Road
Hemel Hempstead
Herts HP3 9PD
tel: 01442 396518
fax: 01442 389353
mobile: 07834 226601
www.grbps.com
------------------------------------


-----Original Message-----
From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx] On
Behalf Of Robert Carneal
Sent: 17 May 2005 21:12
To: mso@xxxxxxxxxxxxx
Subject: [mso] Using IF to select Macro command to carry out? Possible?


In Excel 2000, say I have five macro commands. I will call them
Firsttrip, Secondtrip, Thirdtrip, Fourthtrip, Fifthtrip, SixthTrip,
SeventhTrip, WrongTrip

This is illegal in Excel, but please bear with me:

A6=4
=Choose(A6, Firsttrip, Secondtrip, Thirdtrip, Fourthtrip, Fifthtrip,
SixthTrip, SeventhTrip)

So whenever A6 is 4, run the macro FourthTrip. Possible? I can use
Choose with values and formulas, but what about macros?

Thank you.

Robert


*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes)
in the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also
allow you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation
with instructions.  Once you are a member of the files group, you can go
here to upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in 
the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

Other related posts: