+ Reply to Thread
Results 1 to 5 of 5

How Do I Install a Reset or Clear Function

  1. #1
    CC
    Guest

    How Do I Install a Reset or Clear Function

    I have created an electronic order form and would like to make it reusable.
    Is it possible to install a Reset or a Clear button, so the 'quantity'
    columns will go back to 0?

  2. #2
    Paul B
    Guest

    Re: How Do I Install a Reset or Clear Function

    CC, you could use something like this and assign it to a button, or you may
    want to save the form as a template, that way when you open it you will have
    a blank form to start with each time

    Sub Clear_Column_A()
    'Clears column A
    Columns("A:A").ClearContents
    End Sub
    --
    Paul B
    Always backup your data before trying something new
    Please post any response to the newsgroups so others can benefit from it
    Feedback on answers is always appreciated!
    Using Excel 2002 & 2003


    "CC" <CC@discussions.microsoft.com> wrote in message
    news:6279C797-4236-45BB-BD75-C6822210CC62@microsoft.com...
    >I have created an electronic order form and would like to make it reusable.
    > Is it possible to install a Reset or a Clear button, so the 'quantity'
    > columns will go back to 0?




  3. #3
    Gord Dibben
    Guest

    Re: How Do I Install a Reset or Clear Function

    CC

    Assume you don't want to lose formulas.

    CTRL + A(twice in 2003) to select all cells.

    F5>Special>Constants. Choose what you do or do want to select then OK your
    way out.

    Right-click>Clear Contents.

    Record a macro while you do this and assign to a button.

    Or make it a Template as Paul suggests.


    Gord Dibben Excel MVP


    On Tue, 8 Feb 2005 12:01:02 -0800, "CC" <CC@discussions.microsoft.com> wrote:

    >I have created an electronic order form and would like to make it reusable.
    >Is it possible to install a Reset or a Clear button, so the 'quantity'
    >columns will go back to 0?



  4. #4
    CC
    Guest

    Re: How Do I Install a Reset or Clear Function

    Hey Gord:
    This works GREAT...until I Protect the sheet. I have the "Clear Columns"
    unlocked, and the rest locked. Any suggestions?

    "Gord Dibben" wrote:

    > CC
    >
    > Assume you don't want to lose formulas.
    >
    > CTRL + A(twice in 2003) to select all cells.
    >
    > F5>Special>Constants. Choose what you do or do want to select then OK your
    > way out.
    >
    > Right-click>Clear Contents.
    >
    > Record a macro while you do this and assign to a button.
    >
    > Or make it a Template as Paul suggests.
    >
    >
    > Gord Dibben Excel MVP
    >
    >
    > On Tue, 8 Feb 2005 12:01:02 -0800, "CC" <CC@discussions.microsoft.com> wrote:
    >
    > >I have created an electronic order form and would like to make it reusable.
    > >Is it possible to install a Reset or a Clear button, so the 'quantity'
    > >columns will go back to 0?

    >
    >


  5. #5
    Gord Dibben
    Guest

    Re: How Do I Install a Reset or Clear Function

    CC

    Which version of Excel do you have that has a "Clear Columns" option when
    protecting a sheet?

    2002 and 2003 do not have this option.

    In any case, you will have to unprotect the sheet to have F5>Special
    available.

    You could do the whole thing using a macro if you wish to venture into that.

    Sub Macro1()

    ActiveSheet.Unprotect Password:="justme" 'your PWord
    Cells.Select
    'if just want one column use Columns("A:A").Select

    Selection.SpecialCells(xlCellTypeConstants, 1).Select
    Selection.ClearContents

    ActiveSheet.Protect Password:="justme", DrawingObjects:=True, _
    Contents:=True, Scenarios:=True

    End Sub

    This code unprotects the sheet, selects all cells then selects numerics cells
    only and clears those then re-protects the sheet.


    Gord

    On Thu, 10 Feb 2005 10:35:10 -0800, "CC" <CC@discussions.microsoft.com> wrote:

    >Hey Gord:
    >This works GREAT...until I Protect the sheet. I have the "Clear Columns"
    >unlocked, and the rest locked. Any suggestions?
    >
    >"Gord Dibben" wrote:
    >
    >> CC
    >>
    >> Assume you don't want to lose formulas.
    >>
    >> CTRL + A(twice in 2003) to select all cells.
    >>
    >> F5>Special>Constants. Choose what you do or do want to select then OK your
    >> way out.
    >>
    >> Right-click>Clear Contents.
    >>
    >> Record a macro while you do this and assign to a button.
    >>
    >> Or make it a Template as Paul suggests.
    >>
    >>
    >> Gord Dibben Excel MVP
    >>
    >>
    >> On Tue, 8 Feb 2005 12:01:02 -0800, "CC" <CC@discussions.microsoft.com> wrote:
    >>
    >> >I have created an electronic order form and would like to make it reusable.
    >> >Is it possible to install a Reset or a Clear button, so the 'quantity'
    >> >columns will go back to 0?

    >>
    >>



+ 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