+ Reply to Thread
Results 1 to 3 of 3

Creating macro in Excel that can add a check mark

  1. #1
    marina1072
    Guest

    Creating macro in Excel that can add a check mark

    There is a Macro found in Word (see fax sheet template) that will create a
    check mark in a box if you double click on the box. Does anyone know how
    translate this macro into Excel?

    I am using Word 97 SR-2 (behind the times a bit....)

  2. #2

    Re: Creating macro in Excel that can add a check mark

    Why not just use a checkbox from the forms toolbar?
    marina1072 wrote:
    > There is a Macro found in Word (see fax sheet template) that will create a
    > check mark in a box if you double click on the box. Does anyone know how
    > translate this macro into Excel?
    >
    > I am using Word 97 SR-2 (behind the times a bit....)



  3. #3
    Bob Phillips
    Guest

    Re: Creating macro in Excel that can add a check mark

    Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
    Boolean)
    Const WS_RANGE As String = "H1:H10"

    On Error GoTo ws_exit:
    Application.EnableEvents = False
    If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
    With Target
    If .Value = "a" Then
    .Value = ""
    Else
    .Value = "a"
    .Font.Name = "Marlett"
    End If
    End With
    End If

    ws_exit:
    Application.EnableEvents = True
    End Sub

    'This is worksheet event code, which means that it needs to be
    'placed in the appropriate worksheet code module, not a standard
    'code module. To do this, right-click on the sheet tab, select
    'the View Code option from the menu, and paste the code in.





    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "marina1072" <[email protected]> wrote in message
    news:[email protected]...
    > There is a Macro found in Word (see fax sheet template) that will create a
    > check mark in a box if you double click on the box. Does anyone know how
    > translate this macro into Excel?
    >
    > I am using Word 97 SR-2 (behind the times a bit....)




+ 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