Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Does a "Flip flop" option exist

  1. #1
    Board Regular
    Join Date
    Apr 2002
    Location
    South Bend, IN
    Posts
    996
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I like to click on a field and if the value was Yes, then it would switch to No (and vice versa)

  2. #2
    MrExcel MVP Jay Petrulis's Avatar
    Join Date
    Mar 2002
    Location
    Chicago, IL USA
    Posts
    2,040
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    No. But you can make one using an event macro.

    In a sheet module, try,

    Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Excel.Range, Cancel As Boolean)

    If Target = "Yes" Then
    Target = "No"
    GoTo E:
    End If
    If Target = "No" Then Target = "Yes"
    E:
    Target.Offset(1, 0).Select
    End Sub

  3. #3
    Board Regular
    Join Date
    Apr 2002
    Location
    South Bend, IN
    Posts
    996
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Jay, Thanks for the response

    Never worked with a program like that

    Added it (as you wrote it) under Tools / Macro, but have a feeling that is not the proper way to do it.

    Suggestion?

  4. #4
    MrExcel MVP Jay Petrulis's Avatar
    Join Date
    Mar 2002
    Location
    Chicago, IL USA
    Posts
    2,040
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-30 07:32, UHsoccer wrote:
    Jay, Thanks for the response

    Never worked with a program like that

    Added it (as you wrote it) under Tools / Macro, but have a feeling that is not the proper way to do it.

    Suggestion?
    Hi,

    You have placed it in a regular code module. It needs to go in a sheet module ( a place where the special event-triggered macros are offered by MS). These are different beasts, in general, and are separated from the ones you write and record.

    Right click on the sheet tab click "View Code" and then paste the code. Delete it from the code module and you should be set.

    HTH,
    Jay

  5. #5
    Board Regular
    Join Date
    Apr 2002
    Location
    South Bend, IN
    Posts
    996
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    This forum really works

    Thank you Jay

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •