Results 1 to 4 of 4
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    hide cursor in scroll bar (2000 sr 1)

    is possible to hide the cursor and remain olny the arrow up and down?

    <font face="Script MT Bold">

    Private Sub ScrollBar1_Change()

    ComboBox1 = ""
    TextBox1 = ""

    If Cells(ScrollBar1.Value + 6, 2) = "DIP" Then
    'MsgBox "INIZIO ELENCO, IMPOSSIBILE PROSEGUIRE!", , "ATTENZIONE..."
    Exit Sub
    End If
    If Cells(ScrollBar1.Value + 6, 2) = "" Then
    'MsgBox "FINE ELENCO, IMPOSSIBILE PROSEGUIRE!", , "ATTENZIONE..."
    Exit Sub
    End If

    TextBox14 = Cells(ScrollBar1.Value + 6, 1)
    TextBox2 = Cells(ScrollBar1.Value + 6, 17)
    TextBox3 = Cells(ScrollBar1.Value + 6, 4)
    TextBox4 = Cells(ScrollBar1.Value + 6, 5)
    TextBox5 = Cells(ScrollBar1.Value + 6, 7)
    TextBox6 = Cells(ScrollBar1.Value + 6, 8)
    TextBox7 = Cells(ScrollBar1.Value + 6, 9)
    TextBox9 = Cells(ScrollBar1.Value + 6, 2)
    TextBox13 = Cells(ScrollBar1.Value + 6, 10)
    TextBox30 = Cells(ScrollBar1.Value + 6, 11)
    TextBox16 = Cells(ScrollBar1.Value + 6, 12)
    TextBox18 = Cells(ScrollBar1.Value + 6, 20)
    TextBox21 = Cells(ScrollBar1.Value + 6, 6)
    TextBox20 = Cells(ScrollBar1.Value + 6, 14)
    TextBox31 = Cells(ScrollBar1.Value + 6, 15)
    TextBox32 = Cells(ScrollBar1.Value + 6, 16)
    TextBox33 = Cells(ScrollBar1.Value + 6, 18)
    TextBox34 = Format(Cells(ScrollBar1.Value + 6, 21), "##,##0.00")
    TextBox35 = Cells(ScrollBar1.Value + 6, 22)
    TextBox38 = Cells(ScrollBar1.Value + 6, 23)
    TextBox39 = UCase(Cells(ScrollBar1.Value + 6, 24))
    TextBox39.Enabled = (TextBox38.Text = "5")

    Dim TROVATO As Boolean
    Dim I As Integer
    Dim A As String
    TROVATO = False
    For I = 2 To 50
    A = Trim(Str(Sheets("DB AGENZIE").Cells(I, 1)))
    If Right(TextBox9, 4) = Trim(Str(Sheets("DB AGENZIE").Cells(I, 1))) Then
    TextBox27 = Sheets("DB AGENZIE").Cells(I, 2)
    TextBox11 = Sheets("DB AGENZIE").Cells(I, 3)
    TROVATO = True
    Exit For
    End If

    Next I

    Dim IX As Integer
    Dim AX As String
    TROVATO = False
    For IX = 2 To 1500
    AX = Trim(Str(Sheets("DB AGENZIE").Cells(IX, 4)))
    If Right(TextBox20, 4) = Trim(Str(Sheets("DB AGENZIE").Cells(IX, 4))) Then
    TextBox36 = Sheets("DB AGENZIE").Cells(IX, 5)
    TROVATO = True
    Exit For
    End If
    Next IX

    Dim IY As Integer
    Dim AY As String
    TROVATO = False
    For IY = 2 To 50
    AY = Trim(Str(Sheets("DB AGENZIE").Cells(IY, 1)))
    If Right(TextBox13, 4) = Trim(Str(Sheets("DB AGENZIE").Cells(IY, 1))) Then
    TextBox37 = Sheets("DB AGENZIE").Cells(IY, 3)
    TROVATO = True
    Exit For
    End If
    Next IY

    End Sub </font face=script>

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: hide cursor in scroll bar (2000 sr 1)

    I don't understand your question or how the code is related to your question.

    What scrollbar are you concerned about?

    The cursor can be changed using the Application.cursor property to change to default, hourglass, Arrow, Ibeam as desired

    You can change the MousePointer property of a scrollbar object (as well as other objects) to "Custom" and define your own custom pointer when it goes over that object (MouseIcon property)

    Steve

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: hide cursor in scroll bar (2000 sr 1)

    ... for more clear information my problem is related on the image attached

  4. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: hide cursor in scroll bar (2000 sr 1)

    I do not think there is any way to remove the "scroll box" from a scroll bar.

    The only workaround that I can see:
    Create your own "scroll bar" composed of 4 objects:
    Up (or left) arrow
    Down (or right) arrow
    Top (left) rectangle from up(left) arrow to "center"
    Bottom (right) rectangle from dwon(right) arrow to "center"

    You would have to write your own code the changed a "link cell" value. When the up/left is pressed it would be decreased by a defined "small change" and when down/right it would be increased.

    Similarly you would have code that when the top(left) rectangle was pressed you would decrease the value by the "large change" and increase by the large change when the bottom/right rectangel was pressed.

    You would need to also create the "checking" to make sure that if the change made the value too small (lower than min) it would stay at the min and if the value became larger than the max it would be set at the max.

    Steve

Posting Permissions

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