• Changing default cursor in excel – how to ?

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Changing default cursor in excel – how to ?

    Author
    Topic
    #505875

    ok, so this seemed to be a very simple thing, so i wrote this….

    Code:
    Function CursorChange(State As String)
        If State = “Reset” Then
            Application.Cursor = xlDefault
        ElseIf State = “Change” Then
            Application.Cursor = xlNorthwestArrow
        End If
    End Function
    

    simples! ……. or so i thought ! :huh:

    Whilst this does exactly what is says on the tin, when you call CursorChange(“Change”) or “Reset”, what i wasn’t expecting it to do was change it’s behavior, let me explain…..

    All i wanted was to get rid of that ugly-ass thick white cross that excel has as the default cursor when moving over the worksheet/spreadsheet area, i wanted the new selection to behave exactly the same as the original when i, say, edit a cell, in that it should switch to the I-Beam, or when i mouse over a control box that has a hand icon assigned, it should switch to that new icon.

    Using the code above, does indeed change the cursor, but it also disables ANY other changes :rolleyes:

    help !

    (end goal was to get rid of the cross for the arrow, and then later see if i could change said cursor to a faded/grey one when i mouse over a locked sell)

    Viewing 2 reply threads
    Author
    Replies
    • #1567396

      Hi Gunslinger

      (end goal was to get rid of the cross for the arrow, and then later see if i could change said cursor to a faded/grey one when i mouse over a locked sell)

      ..a locked sell???? is this to do with stocks and shares????

      Good luck with trying to change Excels mouse pointer!!! It’s the stuff of nightmares.
      It’s like buying a diesel-engined car and wanting to convert it to solar-power.

      Anyway, in my attached sample file, I quickly added a modification to show a ‘locked/unlocked’ picture as you move the mousepointer around the sheet. You ‘turn-on’ this behaviour with a mouse ‘right-click’ as per previous row-highlighting thingy.
      Maybe you could use something like that.

      zeddy

    • #1567473

      hahahahahahahaha

      i never saw that typo, but yes, that’d be the workbook lol (new one of those about to be uploaded as i’ve been playing a lot with it, so thought would be good to update the one i had there)

      will have a look at your file, as it’s always good to learn/see new things in action

      EDIT:
      and yes, i’ve crossed swords so to speak with cursors in the past, with mixed results

    • #1567476

      ok, i got errors all over the place on that file, first thing were 2 functions not 64bit office compatible, fixed those then got type mismatch, so i missed something in there relating to longptr i guess, but, that uses times again, so i don’t think i want to go down that route, i can live with the standard cross cursor, i was just hoping (naively) that if you swapped out the base cursor (default one) then the replacement would behave the same and not over-ride subsequent instructions to change

      some you win some you lose !…. my spin button now works as i want, so i’ll take that as my win !

    Viewing 2 reply threads
    Reply To: Changing default cursor in excel – how to ?

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: