how do I enable marco

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all, I am trying to enable a marco when a cell = a value. the cell is
linked to DDE and changes values with a remote device. I cant use
section_change in the VBA to activate my program as the value is
automatically changing. When I configured the cell to change colour via a
formula in the excel sheet the colour changes.
It looks like I have to enable the VBA or macro in the formula bar. Can
anyone please help me with this problem on how to write the formula.
I am using excel 2000 on XP operating system.
thanks in advance
lmg
 
Img

Use a worksheet_change event rather than selection_change. This should fire
on any worksheet change. If it does not then enter a formula referring to
you 'refreshing' data and use a worksheet_calculate event

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
 
Hi Nick, thanks for the speedy response. I should have said but I also tried
worksheet_change and it still didnt work.
could you please go into more detail on the 'refresh method'
and give me an example
thanks
lmg
 
Hi Lmg,
I am trying to enable a marco when a cell = a value. the cell is
linked to DDE and changes values with a remote device.

There are (at least) three alternatives; which one to use will depend
on what you want the macro to do:

1. Use Application.OnData to run a macro every time a DDE link is
updated (See Online help for examples)

2. Use a user-defined-function, called when the cell equals the value,
but that's limited in what it can do.

3. Use the Worksheet_Calculate event to check the cell's value

Regards

Stephen Bullen
Microsoft MVP - Excel
www.oaltd.co.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top