+ Reply to Thread
Results 1 to 3 of 3

Shade cells with links to external workbooks

  1. #1
    Steph
    Guest

    Shade cells with links to external workbooks

    Hello. I am trying to write code that will scan every sheet within a
    workbook and shade each cell that has a link to an external file (ie .xls)?
    I am only concerned about cells, not named ranges, pictures, etc...

    Thanks!



  2. #2
    Tom Ogilvy
    Guest

    Re: Shade cells with links to external workbooks

    ActiveSheet.UsedRange.Interior.ColorIndex = xlNone
    for each cell in Activesheet.UsedRange.SpecialCells(xlFormulas)
    if instr(1,cell.Formula,"[",vbTextcompare) Then
    cell.Interior.ColorIndex = 3
    end if
    Next

    --
    Regards,
    Tom Ogilvy

    "Steph" <[email protected]> wrote in message
    news:%[email protected]...
    > Hello. I am trying to write code that will scan every sheet within a
    > workbook and shade each cell that has a link to an external file (ie

    ..xls)?
    > I am only concerned about cells, not named ranges, pictures, etc...
    >
    > Thanks!
    >
    >




  3. #3
    Steph
    Guest

    Re: Shade cells with links to external workbooks

    Thanks Tom!

    "Tom Ogilvy" <[email protected]> wrote in message
    news:%[email protected]...
    > ActiveSheet.UsedRange.Interior.ColorIndex = xlNone
    > for each cell in Activesheet.UsedRange.SpecialCells(xlFormulas)
    > if instr(1,cell.Formula,"[",vbTextcompare) Then
    > cell.Interior.ColorIndex = 3
    > end if
    > Next
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "Steph" <[email protected]> wrote in message
    > news:%[email protected]...
    > > Hello. I am trying to write code that will scan every sheet within a
    > > workbook and shade each cell that has a link to an external file (ie

    > .xls)?
    > > I am only concerned about cells, not named ranges, pictures, etc...
    > >
    > > Thanks!
    > >
    > >

    >
    >




+ 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