Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I realize this is probably simple and I'm missing the obvious, but I can't
see what's going on. I have coding in a couple of sheets in my workbook that should kick off various instructions when a particular cell is changed, but it's not doing it although it used to. The security settings are right (set on low actually). Can anybody give me an idea of what to look at? Here's the coding in one of the worksheets if that helps: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "D1" Then Application.ScreenUpdating = False ExceptionsStart Application.ScreenUpdating = True End If End Sub In the above example when the value in cell D1 is changed it should run the macro "ExceptionsStart" which leads into others as that one finishes. I do appreciate any help. -- Message posted via http://www.officekb.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The .Address will return something like $A$1--with those dollar signs.
So you can use: If Target.Address = "$D$1" Then or If Target.Address(0,0) = "D1" Then or the one I like: if target.cells.count 1 then exit sub 'singl cell only if intersect(target, me.range("D1")) is nothing then exit sub "Joe_Hunt via OfficeKB.com" wrote: I realize this is probably simple and I'm missing the obvious, but I can't see what's going on. I have coding in a couple of sheets in my workbook that should kick off various instructions when a particular cell is changed, but it's not doing it although it used to. The security settings are right (set on low actually). Can anybody give me an idea of what to look at? Here's the coding in one of the worksheets if that helps: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "D1" Then Application.ScreenUpdating = False ExceptionsStart Application.ScreenUpdating = True End If End Sub In the above example when the value in cell D1 is changed it should run the macro "ExceptionsStart" which leads into others as that one finishes. I do appreciate any help. -- Message posted via http://www.officekb.com -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The default result of .Address method of Range object is an absolute
address, so you should write : If Target.Address = "$D$1" HTH -- AP "Joe_Hunt via OfficeKB.com" <u45578@uwe a écrit dans le message de news: 97593c6d7ba9c@uwe... I realize this is probably simple and I'm missing the obvious, but I can't see what's going on. I have coding in a couple of sheets in my workbook that should kick off various instructions when a particular cell is changed, but it's not doing it although it used to. The security settings are right (set on low actually). Can anybody give me an idea of what to look at? Here's the coding in one of the worksheets if that helps: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "D1" Then Application.ScreenUpdating = False ExceptionsStart Application.ScreenUpdating = True End If End Sub In the above example when the value in cell D1 is changed it should run the macro "ExceptionsStart" which leads into others as that one finishes. I do appreciate any help. -- Message posted via http://www.officekb.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I figured it would be something easy. Thanks to all three of you!
Ardus Petus wrote: The default result of .Address method of Range object is an absolute address, so you should write : If Target.Address = "$D$1" HTH -- AP I realize this is probably simple and I'm missing the obvious, but I can't see what's going on. I have coding in a couple of sheets in my workbook [quoted text clipped - 20 lines] macro "ExceptionsStart" which leads into others as that one finishes. I do appreciate any help. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200906/1 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Got it. Thanks again!
Dave Peterson wrote: Search for .enableevents and that may help. I don't see where it was turned off and then not turned back on, but I re- enabled events at the end of the auto-open and everything seems to work now. [quoted text clipped - 22 lines] -- Message posted via http://www.officekb.com -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200906/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Kick someone out of a Spreadsheet | Excel Discussion (Misc queries) | |||
Code won't kick off | Excel Programming | |||
Worksheets("Sheetname").Select refuses to kick in from User Defined function | Excel Programming | |||
Kick off access using excel. | Excel Discussion (Misc queries) | |||
VBA Code to kick off macro when workbook command to close is initi | Excel Discussion (Misc queries) |