+ Reply to Thread
Results 1 to 4 of 4

clearing cells upon opening or closing

  1. #1
    Registered User
    Join Date
    12-29-2009
    Location
    usa
    MS-Off Ver
    Excel 2003
    Posts
    3

    clearing cells upon opening or closing

    Is there a way to clear a specific cell upon the opening or closing of the file? So for instance, I want the information in cell a1 to clear automatically upon either the opening or closing of the document, but all other cells remain unchanged (assuming that I save it before I close). Is this possible? Thanks for any help on this........

  2. #2
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: clearing cells upon opening or closing

    It would require VBA, and there are some hoops you'd need to go through to force the user to enable macros in order to use the workbook.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    01-01-2010
    Location
    Florida
    MS-Off Ver
    Excel 2003, 2007
    Posts
    5

    Re: clearing cells upon opening or closing

    I believe this is what your looking for. place any code within this event:

    Please Login or Register  to view this content.
    This code to run at open of workbook:

    Please Login or Register  to view this content.

  4. #4
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: clearing cells upon opening or closing

    You should specify which worksheet(s) in which to clear the cell.

    Please Login or Register  to view this content.
    Note: the above code uses the worksheet code name (not the worksheet name, i.e. "January", or "Budget", etc.)

    If there is more than one worksheet involved, you will need additional code and must provide more details.

    As shg points out, all VBA code is subject to the user choosing to enable macros when the file is opened.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

+ 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