Worksheet function

  • Thread starter Thread starter Andrew Haycock
  • Start date Start date
A

Andrew Haycock

Hi i am developing a report and want to apply some conditional
formating to a cell when it is clicked. i am trying to use the
worksheet_change function but need this to not work whilst the report
is being written.

How can i go about this.

Is there any particular place the worksheet_change function needs to
be placed as at the moment it is in the sheet1 page.

Any help would be most appriciated

Andy
 
Hi i am developing a report and want to apply some conditional
formating to a cell when it is clicked. i am trying to use the
worksheet_change function but need this to not work whilst the report
is being written.

I think you need to use SelectionChange rather than Change if you want this to
run when you move from cell to cell.
Is there any particular place the worksheet_change function needs to
be placed as at the moment it is in the sheet1 page.

Then it'd work only in Sheet1. If that's what you want, you're doing this
correctly. If you want it to run on all worksheets, you should use the
Workbook_SheetSelectionChange event handler, which must be in the ThisWorkbook
class module.
 
Harlan Grove said:
...

I think you need to use SelectionChange rather than Change if you want this to
run when you move from cell to cell.


Then it'd work only in Sheet1. If that's what you want, you're doing this
correctly. If you want it to run on all worksheets, you should use the
Workbook_SheetSelectionChange event handler, which must be in the ThisWorkbook
class module.


Cheers ill give it a go
 
Back
Top