Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() in Range [A1:D1] I insert some data by hand, but sometimes the value is zero. the .Range("D45").GoalSeek goal:=0, changingcell:=.Range("D44") is based on A1 value and so on for the other lines. My question is, when in the range [A1:D1] the value is ZERO the code stops for debug, how can I avoid this without open all the times the debug window and coment the .ranges that corresponds to Zero value in RANGE [A1:D1]? That is something that I can put in the below code? B6:B7 is what triggers the Goal seek command. Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, forside.Range("B6:B7")) Is Nothing Then Exit Sub Else .Range("D45").GoalSeek goal:=0, changingcell:=.Range("D44") 'A1 value .Range("f45").GoalSeek goal:=0, changingcell:=.Range("F44") 'B1 value .Range("h45").GoalSeek goal:=0, changingcell:=.Range("H44") 'C1 value .Range("J45").GoalSeek goal:=0, changingcell:=.Range("J44") 'D1 value End If End Sub Could someone help me |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Breakpoint debug problem | Excel Programming | |||
help with debug | New Users to Excel | |||
Debug Problem | Excel Programming | |||
help with debug | Excel Programming | |||
Debug problem | Excel Programming |