Syntax when referring to self
General syntax question:
This does not work: With Cell_Object If .Value = 0 And Not(IsEmpty(.) Then .EntireRow.Delete Shift:=xlUp End With 'Cell_Object I am looking for a general way to refer to the object that is the subject of the "With ..." statement within that "With .." "loop". In the above example it would be substituted for the "." contained within the "IsEmpty() expression. But that is just an example and I am looking for a general method. I tried Not(IsEmpty(.me)) but whilst that compiled OK it failed on run time (error 438, does not support property or method) Thanks -- Return email address is not as DEEP as it appears |
Syntax when referring to self
Try:
IsEmpty(.Value) IsEmpty takes a literal value or a pointer i.e variable name or object like ActiveCell. "Jack Schitt" wrote: General syntax question: This does not work: With Cell_Object If .Value = 0 And Not(IsEmpty(.) Then .EntireRow.Delete Shift:=xlUp End With 'Cell_Object I am looking for a general way to refer to the object that is the subject of the "With ..." statement within that "With .." "loop". In the above example it would be substituted for the "." contained within the "IsEmpty() expression. But that is just an example and I am looking for a general method. I tried Not(IsEmpty(.me)) but whilst that compiled OK it failed on run time (error 438, does not support property or method) Thanks -- Return email address is not as DEEP as it appears |
Syntax when referring to self
Jack Schitt wrote:
General syntax question: This does not work: With Cell_Object If .Value = 0 And Not(IsEmpty(.) Then .EntireRow.Delete Shift:=xlUp End With 'Cell_Object I am looking for a general way to refer to the object that is the subject of the "With ..." statement within that "With .." "loop". In the above example it would be substituted for the "." contained within the "IsEmpty() expression. But that is just an example and I am looking for a general method. I tried Not(IsEmpty(.me)) but whilst that compiled OK it failed on run time (error 438, does not support property or method) Thanks Why doesn't .Value = 0 already negate IsEmpty(Cell_Object)? Alan Beban |
All times are GMT +1. The time now is 11:21 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com