sheet macros
I have a macro on a sheet that works fine, every time you select a new cell
up pops my form, great, except sometimes it really bugs me. What I thought was I'd add a button on the form to turn the macro off, or rename it so it doesn't fire on Worksheet_SelectionChange. My only success so far is stick a value in a cell and have the Worksheet_SelectionChange macro look in this cell for a go/no go flag. Is there a better way? |
sheet macros
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim fire As String FireEvents = Cells(1, 1) Select Case FireEvents Case Is = "yes" MsgBox "yes" Case Is = "no" 'Exit Sub End Select End Sub "Graham Y" wrote: I have a macro on a sheet that works fine, every time you select a new cell up pops my form, great, except sometimes it really bugs me. What I thought was I'd add a button on the form to turn the macro off, or rename it so it doesn't fire on Worksheet_SelectionChange. My only success so far is stick a value in a cell and have the Worksheet_SelectionChange macro look in this cell for a go/no go flag. Is there a better way? |
All times are GMT +1. The time now is 12:46 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com