View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Barry Lennox[_2_] Barry Lennox[_2_] is offline
external usenet poster
 
Posts: 29
Default Macro wont run on cell change


Hi OssieMac
I am organising a spreadsheet to help organise a roster for volunteers.
A range in Sheet2 has the times when volunteers are available, (the
volunteer's name occurs in A2. Sometimes volunteers have variations to their
usual plan, this is when I make manual entries. The range has to be refreshed
each time a new volunteer is selected. This is why the Macro must run in
sheet2 as it refreshes the range of cells with formulae.
Entry sheet has the grid of time slots.The information in Entry K2 is
changed from a scroll bar in Entry.
I have tried reversing things, having the scroll bar in Sheet2 but other
problems arise (not relating to this issue)
Sheet2!A2 = Entry! K2
I need multiple windows open.

The Macro IS in Sheet2
..

Sub Refresh()
' Refreshes Availability data
' Macro recorded 16/02/2009 by Barry
Range("L4:Q75").Select
Selection.Copy
Range("E4").Select
ActiveSheet.Paste
End Sub

Four windows need to be open.

I hope this helps clarify things



"OssieMac" wrote:

Hi again Barry,

I think that I am confused about what you want to occur. I thought that if
A2 changes then you want the macro to run. From your last post I am assuming
that A2 is on Sheet2. Is this correct or not?

I also thought from the formula you posted that Sheet2 A2 changes every time
Sheet Entry K2 changes. Is this correct?

If you want the macro to run every time Sheet2 A2 changes then if you have
placed the macro in Sheet2 then what does it matter what is the active sheet?
Did you place the macro in Sheet2 module? You should right click Sheet2 tab
and select View Code to ensure you are placing it in the correct module.

You said that you have multiple windows open. Do you mean multiple Workbooks
open or multiple instances of Excel open?

Perhaps you can give me a step by step description as follows.
What conditions should trigger the macro?
What occurs in the sub Refresh? (Perhaps post the sub)



--
Regards,

OssieMac