+ Reply to Thread
Results 1 to 6 of 6

Clearing Contents ?

  1. #1
    Forum Contributor
    Join Date
    07-02-2006
    Location
    Love City, USA
    Posts
    183

    Question Clearing Contents ?

    Hello,

    Is there a way I can clear the contents of a predefined area within a
    form by simply clicking some type of created RESET button without
    using any type of coding? I was hoping this could be done with some
    type of excel formula without having to use a script.

    example:

    Click here to reset your information..

    (the information to be cleared would be D5:E30)

    Thanks for any helpful respones..

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by Mhz
    Hello,

    Is there a way I can clear the contents of a predefined area within a
    form by simply clicking some type of created RESET button without
    using any type of coding? I was hoping this could be done with some
    type of excel formula without having to use a script.

    example:

    Click here to reset your information..

    (the information to be cleared would be D5:E30)

    Thanks for any helpful respones..
    Hi,

    a formula can affect only the cell in which the formula is located.

    The easiest way to do what you ask is to select Tools, Macro. and record a macro, clear the cells, stop recording, then assign a Shortcut key to the macro.

    note, you can, of course, add a button to that script as required.

    hth
    ---
    Last edited by Bryan Hessey; 01-21-2007 at 04:49 AM.
    Si fractum non sit, noli id reficere.

  3. #3
    Forum Contributor
    Join Date
    07-02-2006
    Location
    Love City, USA
    Posts
    183
    Thanks Bryan, I think I got it going.

    Is there a way to undo the clear contents function just in case a person
    clear the fields by mistake? I notice there is no UNDO available when the
    contents are cleared.

    Or perhaps, is it possible to have a warning before using the clear contents Macro?

    thanks for your help..

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    You can't undo macro usually however John Walkenbach has a tip for you

    http://www.j-walk.com/ss/excel/tips/tip23.htm


    Just change the zero (0) with "" if you wish

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  5. #5
    Forum Contributor
    Join Date
    07-02-2006
    Location
    Love City, USA
    Posts
    183
    Thanks for the info VBA, although as an ameture I'm a bit confused about where
    I should put my range (D5:E30) within the coding. That is the area where
    I want cleared.

  6. #6
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    Add John's code from link to a blank module then use this to call it

    Please Login or Register  to view this content.
    VBA Noob

+ 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