Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
filo666
 
Posts: n/a
Default Executing a macro from a cell

1. There is some way to make that excel, starting from a conditional
structure in a cell, execute automatically a macro???

Something like this:
A B
1
2 1 =if(A2=1,macro1(),macro2())

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

No, functions can return a value, they cannot change the format or run a
macro.

You can use event code to do it, but not a worksheet function.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"filo666" wrote in message
...
1. There is some way to make that excel, starting from a conditional
structure in a cell, execute automatically a macro???

Something like this:
A B
1
2 1 =if(A2=1,macro1(),macro2())



  #3   Report Post  
Harald Staff
 
Posts: n/a
Default

Hi

No, impossible. This is a limitation by design. A macro could change the
cell itself, the sheet, excel, and therefore mess up the original logic and
the order of calculations.

But Excel has several "calculate" events that you might use to create a
simiular effect.

HTH. Best wishes Harald

"filo666" skrev i melding
...
1. There is some way to make that excel, starting from a conditional
structure in a cell, execute automatically a macro???

Something like this:
A B
1
2 1 =if(A2=1,macro1(),macro2())



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
show macro security setting in a cell Mark Excel Worksheet Functions 3 March 21st 05 07:53 AM
Help Pls re macro cell address Hugh Jago Excel Discussion (Misc queries) 2 January 5th 05 09:01 PM
Executing macro for all worksheet from a different worksheet Biti New Users to Excel 3 December 8th 04 10:05 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM
macro error at cell Newtek Excel Worksheet Functions 1 November 18th 04 07:08 PM


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