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

    SUGGESTION FOR MY OLD PROJECT.... (2000 sr 1)

    it knows well my project....
    userform to search.

    suggestion:

    in txt box 38 i have insert a condition:

    Private Sub TextBox38_Change()

    If Indirizzario.TextBox28.Value = "L0785_CDI_50" Then

    If Not (TextBox38 = "" Or TextBox38 = "1" Or TextBox38 = "2") Then
    MsgBox ("CODICI AMMESSI: 1, 2"), , "ATTENZIONE..."
    Indirizzario.TextBox38 = ""
    Exit Sub
    End If

    is possible when the user click with the moUse or go with tab, in this txt box, to make appear little window:

    POSSIBLE OPTION:

    1 - OPTION TEST01
    2 - OPTION TEST02

    For example when inserting (in the standard mode Excel) a comment in a cell ...

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

    Re: SUGGESTION FOR MY OLD PROJECT.... (2000 sr 1)

    The easiest solution is to use the ControlTipText property of TextBox38. You can set this in the Properties window.

    Note: you cannot insert line ends in the ControlTipText.

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

    Re: SUGGESTION FOR MY OLD PROJECT.... (2000 sr 1)

    ... attache a little example, i have insert your suggestion but it not work?
    Tks.

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

    Re: SUGGESTION FOR MY OLD PROJECT.... (2000 sr 1)

    The ControlTipText will be displayed when you hold the mouse pointer over the text box.

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

    Re: SUGGESTION FOR MY OLD PROJECT.... (2000 sr 1)

    Ok!OK!.... i have not see...
    It work!

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

    Re: SUGGESTION FOR MY OLD PROJECT.... (2000 sr 1)

    VERY DIFFICULT QUESTION:

    ... remember the combo box1, ok, this show a list of record for selection... i have seen this list and this not appera in order from the little to the big, is possible to order this list and not change the order in the sheet, but order a list only when the list is show? Hope i am clear(?!)

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

    Re: SUGGESTION FOR MY OLD PROJECT.... (2000 sr 1)

    Sal,

    You will have to change several things in the code behind the INDIRIZZARIO form. At the end, below the existing code, add this new procedure:

    Private Sub SetRowSource()
    Dim rngSource As Range
    ' Check if there are records
    If Range("Q7") = "" Then
    ' No - leave combo box blank
    Indirizzario.ComboBox1.RowSource = ""
    Else
    ' Yes, set row source
    Set rngSource = Range(Range("Q7"), Range("Q65536").End(xlUp))
    With Worksheets("DB AGENZIE")
    .Range("G:G").Clear
    rngSource.Copy .Range("G1")
    .Range("G1").Sort Key1:=.Range("G1")
    Indirizzario.ComboBox1.RowSource = .Range(.Range("G1"), _
    .Range("G65536").End(xlUp)).Address(External:=True )
    End With
    Set rngSource = Nothing
    End If
    End Sub

    Go to the CommandButton8_Click procedure. Remove the code to set the row source of ComboBox1, and replace it by this instruction:

    SetRowSource

    Do the same for CommandButton9_Click and CommandButton10_Click. You must also insert this instruction in the procedure that deletes a record (I have forgotten what the name of this procedure is.)

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

    Re: SUGGESTION FOR MY OLD PROJECT.... (2000 sr 1)

    Note: i have already inserted to end of script your Private Sub SetRowSource in the bottom of script in the form of indirizzario

    ... for example this:

    code.................
    ' Yes, set row source

    Indirizzario.ComboBox1.RowSource = Range(Range("Q7"), _
    Range("Q65536").End(xlUp)).Resize(, 2).Address(External:=True)

    TextBox2 = c.Value
    code.................

    with this:


    code.....................
    ' Yes, set row source

    SetRowSource

    TextBox2 = c.Value
    code.................

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

    Re: SUGGESTION FOR MY OLD PROJECT.... (2000 sr 1)

    You need to replace a bit more: replace this

    ' Check if there are records
    If Range("Q7") = "" Then
    ' No - leave combo box blank
    Indirizzario.ComboBox1.RowSource = ""
    Else
    ' Yes, set row source
    Indirizzario.ComboBox1.RowSource = .Range(.Range("Q7"), _
    .Range("Q65536").End(xlUp)).Address(External:=True )
    End If

    with

    SetRowSource

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

    Re: SUGGESTION FOR MY OLD PROJECT.... (2000 sr 1)

    UHMMMMMMM...
    Sorry but i have a difficult, i have attache my last form indirizzario, please set this with your suggestion.
    Patience please...
    Tks.

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

    Re: SUGGESTION FOR MY OLD PROJECT.... (2000 sr 1)

    Try this version. I have modified the code and corrected the indenting.

Posting Permissions

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