Results 1 to 8 of 8
  1. #1
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Hans' Code (2002)

    Could you post a link to the thread where you found it?

  2. #2
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    La Jolla, CA
    Posts
    1,470
    Thanks
    30
    Thanked 62 Times in 58 Posts

    Re: Hans' Code (2002)

    Post 508079

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Hans' Code (2002)

    It is very easy to post a link:
    - Select the text with the post number below the subject, including the square brackets: <!t>[Post: 508,079]<!/t>.
    - Press Ctrl+C to copy this text to the clipboard.
    - In your reply, press Ctrl+V to paste the text.
    - When you post, the Lounge software will convert the text to a clickable link: <post#=508,079>post 508,079</post#>.
    This is much more user-friendly than forcing other Loungers to locate the post themselves.

    The workbook I attached to that post activates the keyboard assignments when the workbook/worksheet is activated and deactivates them when the workbook/worksheet is deactivated - see the code in the ThisWorkbook and Sheet1 modules. In that sense, the assignments do not stick.

  4. #4
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    La Jolla, CA
    Posts
    1,470
    Thanks
    30
    Thanked 62 Times in 58 Posts

    Re: Hans' Code (2002)

    What I can't determine is why the effect won't work on additional columns. Why won't the following edit of your function apply to both cols 3 and 6?
    Sub TrapPlus()
    If ActiveCell.Column = 3 Or ActiveCell.Column = 6 Then
    If IsNumeric(ActiveCell) Or IsDate(ActiveCell) Then
    ActiveCell = ActiveCell + 1
    End If
    End If
    End Sub

  5. #5
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Hans' Code (2002)

    Are you sure you are using the ActiveCell correctly?

    The way I read that macro, my selection must be in either column 3 or six otherwise nothing happens. You can't select a range and have the macro do anything unless the activecell is somewhere in the third or sixth column - and then the action only applies to the current cell, not the selected range.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Hans' Code (2002)

    If you're using the workbook attached to <post:=508,079>post 508,079</post:> as starting point, you *must* also modify the code in the ThisWorkbook module and in the Sheet1 module. They also check the column of the active cell.

  7. #7
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    La Jolla, CA
    Posts
    1,470
    Thanks
    30
    Thanked 62 Times in 58 Posts

    Trapping keys in Excel (2002)

    Subject modified by HansV to aid in future searches

    In a search I found a set of macros you suggested to someone for trapping keys and the + and - keys on the keypad.
    I modified the trapminus as follows...but, it doesn't seem to "stick"...I ran the trapkeys macro. What did I do incorrectly?
    I tried selecting a group of cells, one cell...overlooking something, I guess. Thanks in advance.

    Sub TrapMinus()
    If ActiveCell.Column = 3 Or ActiveCell.Column = 6 Then
    If IsNumeric(ActiveCell) Or IsDate(ActiveCell) Then
    ActiveCell = ActiveCell - 1
    End If
    End If
    End Sub

  8. #8
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    La Jolla, CA
    Posts
    1,470
    Thanks
    30
    Thanked 62 Times in 58 Posts

    Re: Hans' Code (2002)

    Thanks, Hans. I overlooked the mods required for those other two: ThisWorkbook and Sheet1

Posting Permissions

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