Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    USER FORM TO SEARCH (2000 sr 1)

    For HansV (my teacher) it know my prob for this work...

    OK! the project is finished!

    Suggestion and strategy for new Implement new add-in
    ===========================================
    note: i ahve insert in from new path the txt file in server01epf and not c:epf

    step by step

    i would want distribuite a to 5 user this wbook

    if the first user import the txt file one of this 5 user have a problem if it start the same macro to import a txt file?
    if the import is start in the same time from all user have a problem?

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

    Re: USER FORM TO SEARCH (2000 sr 1)

    Do you give each user a separate copy of the workbook, or is there one workbook that is used by all users?

    If all users need to work with the same workbook, please note that Excel is not very good at that. Although there is an option to make a workbook shared, I wouldn't recommend using that. If you don't share a workbook, only one user can edit a workbook at a time.

    If each user has a separate copy, there should be no problem if several of them import a text file at the same time. But then, changes made by one user will not be seen by the other users.

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

    Re: USER FORM TO SEARCH (2000 sr 1)

    No, i distribuite a separate wbook for each user (to the default mode not is possible make change in the wbook i locked all cells) the wbook is only for inquiry or searching...

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

    Re: USER FORM TO SEARCH (2000 sr 1)

    There should be no problem then. Opening a text file for input does not lock it, so several users can import it at the same time.

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

    Re: USER FORM TO SEARCH (2000 sr 1)

    my dear are you on line?

    i have unlock 2 text box for and permit a data entry from indirizzaio.show

    ================================================== ===
    I permit in event change this, and i would want to insert this condition:
    if insert 12/6 automaticly appear in text box 12/06/2004

    Private Sub TextBox34_Change()
    Cells(ScrollBar1.Value + 6, 21) = TextBox34)
    End Sub
    ================================================== =====
    I permit in event change this, and i would want to insert this condition:
    if insert 12 automaticly appear in text box 12,00
    if insert 12,00 automaticly appear in text box 12,00
    if insert 1200 automaticly appear in text box 1.200,00

    Private Sub TextBox35_Change()
    Cells(ScrollBar1.Value + 6, 22) = TextBox35
    End Sub
    ================================================== ===

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

    Re: USER FORM TO SEARCH (2000 sr 1)

    I wouldn't use the Change event of the text boxes for this, but the Before Update event.

    Private Sub TextBox34_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
    If TextBox34 = "" Then
    Cells(ScrollBar1.Value + 6, 21).Value = ""
    ElseIf IsDate(TextBox34) Then
    Cells(ScrollBar1.Value + 6, 21).Value = CDate(TextBox34)
    TextBox34 = Format(TextBox34, "dd/mm/yyyy")
    Else
    MsgBox "Please enter a valid date.", vbExclamation
    Cancel = True
    End If
    End Sub

    Private Sub TextBox35_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
    If TextBox35 = "" Then
    Cells(ScrollBar1.Value + 6, 22).Value = ""
    ElseIf IsNumeric(TextBox35) Then
    Cells(ScrollBar1.Value + 6, 22).Value = CDbl(TextBox35)
    TextBox35 = Format(TextBox35, "0.00")
    Else
    MsgBox "Please enter a valid number.", vbExclamation
    Cancel = True
    End If
    End Sub

    2. Don't forget to set the correct format in the cells on the worksheet, if you haven't already done so:

    - Select column U (= column number 21)
    - Select Format | Cells... or press Ctrl+1
    - In the Number tab, select the Date category, then select a date format that looks like 14/03/2001.
    - Click OK.

    - Select column V (= column number 22)
    - Select Format | Cells... or press Ctrl+1
    - In the Number tab, select the Number category, and specify 2 decimal places.
    - Click OK.

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

    Re: USER FORM TO SEARCH (2000 sr 1)

    THIS LOOP NOT WORK...

    I have this routine and my problem is:

    if you insert 1 appear the msg box when the condition is If TextBox38 = "1" And TextBox21 = "36" Then MsgBox ("ASSEGNO PAGATO!"), , "ATTENZIONE..."

    but if i insert another number different to 1 clear the TextBox38 = "" else continue the routine...


    Private Sub TextBox38_Change()

    If TextBox38 = "1" And TextBox21 = "36" Then MsgBox ("ASSEGNO PAGATO!"), , "ATTENZIONE..."
    TextBox38 = ""

    continue from this

    Dim TROVATO As Boolean
    Dim I As Integer
    Dim A As String
    TROVATO = False
    For I = 2 To 10
    A = Trim(Str(Sheets("DB AGENZIE").Cells(I, 6)))
    If Right(TextBox38, 1) = Trim(Str(Sheets("DB AGENZIE").Cells(I, 6))) Then
    TextBox18 = Sheets("DB AGENZIE").Cells(I, 7)
    TROVATO = True
    Exit For
    End If

    Next I

    Cells(ScrollBar1.Value + 6, 20) = Indirizzario.TextBox18.Value
    Cells(ScrollBar1.Value + 6, 23) = Indirizzario.TextBox38.Value

    End Sub

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

    Re: USER FORM TO SEARCH (2000 sr 1)

    Sorry, it's not clear to me what you want. Please try to be as clear as you can.
    1. <LI>If TextBox38 = "1" and TextBox21 = "36", display a message box. Then what?
      <LI>If TextBox38 = "1" and TextBox21 <> "36", then what?
      <LI>If TextBox38 <> "1", clear TextBox38. Then what?
    If the user is only allowed to enter "1" in TextBox38, what is its purpose?

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

    Re: USER FORM TO SEARCH (2000 sr 1)

    i have solved:

    If TextBox38 = "1" And TextBox21 = "36" Then
    MsgBox ("ASSEGNO PAGATO!"), , "ATTENZIONE..."
    TextBox38 = ""
    TextBox18 = ""

    Else
    .....
    Dim TROVATO As Boolean
    Dim I As Integer
    Dim A As String

    Tks as usual...

    OH!OH!....

    .. but i have the msg box also with the txtbox 21 is ="55"


    in effect if txtbox36 i insert 1 or 2 or 3 or 4 and txt box 21 contain "36" it must appear the msg box with allert
    but if in txt box 21 contain a different "36" continue the ruoutine and skip the routine...

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

    Re: USER FORM TO SEARCH (2000 sr 1)

    unsolved prob HansV take a eyes...
    see my last post
    Tks

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

    Re: USER FORM TO SEARCH (2000 sr 1)

    Sorry, I still don't understand the description.

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

    Re: USER FORM TO SEARCH (2000 sr 1)

    Whit the file in the "hand"...

    WWW.GSSITALY.COM/L0785.ZIP

    Sorry for the dimension!

    This is my last work and is completed 98%...

    test the condition in txt box in this routine:
    Private Sub TextBox38_Change()

    persist the error...
    still only many little problem....

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

    Re: USER FORM TO SEARCH (2000 sr 1)

    The "And" operator has precedence above the "Or" operator, so the line

    If TextBox38 = "1" Or TextBox38 = "2" Or TextBox38 = "3" Or TextBox38 = "4" And TextBox32 = "PAGATO" Then

    actually says: if TextBox38 equals "1" or "2" or "3" or (TextBox38 equals "4" and TextBox32 equals "PAGATO") then etc. You must use ( and ) to change this:

    If (TextBox38 = "1" Or TextBox38 = "2" Or TextBox38 = "3" Or TextBox38 = "4") And TextBox32 = "PAGATO" Then

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

    Re: USER FORM TO SEARCH (2000 sr 1)

    as usual,
    Music, music, "...only you"
    Tks.

    Suggestion:

    when the user form indirizzrio.show is called is better to fill the all txtbox with the information of first record, or not?

    same suggestion if i click on CommandButton8, CommandButton9, CommandButton10... from indirizzario?

    and if, you accept this solution, how to make this option?


    ================================================== ==================

    for you our project wath is the rating from 0 to 10?
    is a good idea to menage the record (insert, delete, modify...ecc.)

    ================================================== ==================

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

    Re: USER FORM TO SEARCH (2000 sr 1)

    sorry, is possible to insert also the modify
    ....
    if you insert a number >4 it must appear msg box "attention this choice is not possible!"

    if <4 ok go to the next part of code....
    ....

    the choice is only 1,2,3, or 4 if you have seen in the hide sheet DB AGENZIE
    .....

Page 1 of 2 12 LastLast

Posting Permissions

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