+ Reply to Thread
Results 1 to 2 of 2

Undo Borders

  1. #1
    prasanta
    Guest

    Undo Borders

    Hello,

    I am able to programatically add borders to cells or range or multiple
    ranges. But I am unable to programatically undo the borders applied.
    Can someone let me know if this is a bug.

    // the below line works
    oActiveSheet.get_Range("A1:C5",oMissing).BorderAround(oMissing,Excel.XlBorderWeight.xlThick,Excel.XlColorIndex.xlColorIndexAutomatic,oMissing);

    // this doesnt work
    oExcelApp.Undo();

    Thanks
    Prasanta


  2. #2
    Rob Bovey
    Guest

    Re: Undo Borders

    Hi Prasanta,

    The undo feature in Excel only applies to actions taken by the user
    through the UI. The undo stack doesn't contain anything you do
    programmatically. If you want to be able to undo actions that your program
    takes you'll have to roll your own undo stack, which is more trouble than
    it's worth in the vast majority of cases IMO.

    --
    Rob Bovey, Excel MVP
    Application Professionals
    http://www.appspro.com/

    * Take your Excel development skills to the next level.
    * Professional Excel Development
    http://www.appspro.com/Books/Books.htm

    "prasanta" <[email protected]> wrote in message
    news:[email protected]...
    > Hello,
    >
    > I am able to programatically add borders to cells or range or multiple
    > ranges. But I am unable to programatically undo the borders applied.
    > Can someone let me know if this is a bug.
    >
    > // the below line works
    > oActiveSheet.get_Range("A1:C5",oMissing).BorderAround(oMissing,Excel.XlBorderWeight.xlThick,Excel.XlColorIndex.xlColorIndexAutomatic,oMissing);
    >
    > // this doesnt work
    > oExcelApp.Undo();
    >
    > Thanks
    > Prasanta
    >




+ 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