+ Reply to Thread
Results 1 to 3 of 3

VBA version of ISBLANK()

Hybrid View

Guest VBA version of ISBLANK() 03-04-2006, 12:20 PM
Guest RE: VBA version of ISBLANK() 03-04-2006, 12:45 PM
Guest Re: VBA version of ISBLANK() 03-04-2006, 02:55 PM
  1. #1
    Nicholas B
    Guest

    VBA version of ISBLANK()

    Anyone know how to get VBA to check if a cell is blank before reading its
    formula ?

    If it was just a single cell I can point to it using a formula [ Eg
    =ISBLANK(D12) ] and use VBA to read the value of that Cell (the one with the
    ISBLANK() Formula).

    But I've many cells I want to test, cannot find a VBA equivalent to
    ISBLANK() and if I use the following line

    FormulaB4Change = CStr(ActiveCell.Formula)

    The code crashes on empty cells

    Nick


  2. #2
    Nicholas B
    Guest

    RE: VBA version of ISBLANK()

    OK Ignore this. I'm wrong. Doesn't crash on ALL empty cells just one
    particular cell
    Have tried IsEmpty() but that still crashes

    Thanks

    "Nicholas B" wrote:

    > Anyone know how to get VBA to check if a cell is blank before reading its
    > formula ?
    >
    > If it was just a single cell I can point to it using a formula [ Eg
    > =ISBLANK(D12) ] and use VBA to read the value of that Cell (the one with the
    > ISBLANK() Formula).
    >
    > But I've many cells I want to test, cannot find a VBA equivalent to
    > ISBLANK() and if I use the following line
    >
    > FormulaB4Change = CStr(ActiveCell.Formula)
    >
    > The code crashes on empty cells
    >
    > Nick
    >


  3. #3
    Jim Cone
    Guest

    Re: VBA version of ISBLANK()

    Nick,
    You could also use Len(a cell reference)
    Jim Cone
    San Francisco, USA
    http://www.realezsites.com/bus/primitivesoftware



    "Nicholas B" <NicholasB@discussions.microsoft.com>
    wrote in message...
    OK Ignore this. I'm wrong. Doesn't crash on ALL empty cells just one
    particular cell
    Have tried IsEmpty() but that still crashes

    Thanks

    "Nicholas B" wrote:

    > Anyone know how to get VBA to check if a cell is blank before reading its
    > formula ?
    >
    > If it was just a single cell I can point to it using a formula [ Eg
    > =ISBLANK(D12) ] and use VBA to read the value of that Cell (the one with the
    > ISBLANK() Formula).
    >
    > But I've many cells I want to test, cannot find a VBA equivalent to
    > ISBLANK() and if I use the following line
    >
    > FormulaB4Change = CStr(ActiveCell.Formula)
    >
    > The code crashes on empty cells
    >
    > Nick
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1