On Sep 23, 6:55 pm, Dave Peterson <peter...@verizonXSPAM.net> wrote:
> I'm saying that if that range AI3:AI4 contains formulas or is empty, then that
> code will fail. It's looking for constants. If there are no constants, then it
> won't work.
>
> Maybe you should double check that range once more.
>
>
>
>
>
> Sean wrote:
>
> > On Sep 23, 4:49 pm, Dave Peterson <peter...@verizonXSPAM.net> wrote:
> > > If there are no constants in that range, then this will fail...
>
> > > For Each cell In ThisWorkbook.Sheets("E-Figures") _
> > > .Range("AI3:AI4").Cells.SpecialCells(xlCellTypeConstants)
>
> > > Maybe you could check first
>
> > > dim RngToCheck as range
> > > ...
>
> > > set rngtocheck = nothing
> > > on error resume next
> > > set rngtocheck = ThisWorkbook.Sheets("E-Figures") _
> > > .Range("AI3:AI4").Cells.SpecialCells(xlCellTypeConstants)
> > > on error goto 0
>
> > > if rngtocheck is nothing then
> > > 'what should happen
> > > else
> > > For Each cell In rngtocheck.cells
> > > ...
>
> > > Sean wrote:
>
> > > > On Sep 23, 2:08 pm, Dave Peterson <peter...@verizonXSPAM.net> wrote:
> > > > > > > Is your worksheet protected?
> > > > > Sean wrote:
>
> > > > > > On Sep 23, 1:34 pm, Dave Peterson <peter...@verizonXSPAM.net> wrote:
>
> > > > > <<snipped>>
>
> > > > Dave it is but I unprotect it towards the start of the code
>
> > > > Sheets("E-Figures").Select
> > > > ActiveSheet.Unprotect Password:="123"
>
> > > > E-Figures is where the e-mail address in A13:AI4 reside, where I'm
> > > > having the problem
>
> > > --
>
> > > Dave Peterson- Hide quoted text -
>
> > > - Show quoted text -
>
> > Dave, not entirely sure what you mean. The contents of the cells
> > AI3:AI4 are
>
> > 'joe.blo...@abc.com
> > 'jack.blo...@abc.com
>
> > but it still fails.
>
> > BTW it worked previously with no problems, but in doesn't any more
>
> --
>
> Dave Peterson- Hide quoted text -
>
> - Show quoted text -
Definitely Dave, there are values in AI3:AI4 in sheet E-Figures
|