Page 1 of 3 123 LastLast
Results 1 to 15 of 40
  1. #1
    3 Star Lounger
    Join Date
    Apr 2001
    Location
    London, Gtr London, England
    Posts
    357
    Thanks
    0
    Thanked 0 Times in 0 Posts

    RE: Operationalising User Forms (XP SR1)

    Having made great progress via extremely helpful advice on another thread, 'Re: Picking-up User Form Entries (XP SP1)', I'm having difficulty making textbox entries with a decimal point eg 5.7. The number 5 will be taken but i cannot enter the decimal place. However, if i enter the decimal place without the number 5 then it is recognised. If i enter 57 and then insert the cursor between the 5 and 7 then the decimal can be inserted this way. Is this my keyboard or the userform needs to be formatted in some way? Thanks.

    F

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

    Re: RE: Operationalising User Forms (XP SR1)

    As far as I know, there should be no problem entering numbers with a decimal point in text boxes on a userform. Could it be a keyboard problem? Do you have trouble entering a point in other situations?

  3. #3
    3 Star Lounger
    Join Date
    Apr 2001
    Location
    London, Gtr London, England
    Posts
    357
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: RE: Operationalising User Forms (XP SR1)

    Thanks for that. No problem with the decimal point with other applications. Could be some quirk at work here!

    F

  4. #4
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: RE: Operationalising User Forms (XP SR1)

    Could you post an abridged version of the particular document, with enough to demonstrate the textbox problem? It sounds a very odd one.

    Alan

  5. #5
    3 Star Lounger
    Join Date
    Apr 2001
    Location
    London, Gtr London, England
    Posts
    357
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: RE: Operationalising User Forms (XP SR1)

    Here is some of the Userform code:
    Private Sub USERFORM_Initialize()
    Me.OutputLabel_1.Caption = Sheets("sheet1").Range("c2")
    Me.OutputLabel_2.Caption = Sheets("sheet1").Range("c3")
    Me.OutputLabel_3.Caption = Sheets("sheet1").Range("c4")
    Me.OutputLabel_4.Caption = Sheets("sheet1").Range("c5")
    Me.OutputLabel_5.Caption = Sheets("sheet1").Range("c6")
    End Sub
    Private Sub txtswap2005_Change()
    Sheets("Sheet1").Range("a2") = txtswap2005.Value
    End Sub
    Private Sub txtswap2005_AfterUpdate()
    Me.OutputLabel_1.Caption = Sheets("sheet1").Range("c2")
    End Sub

    F

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

    Re: RE: Operationalising User Forms (XP SR1)

    That's not what Alan asked. He would like to have a look at a stripped down copy of the workbook itself.

  7. #7
    3 Star Lounger
    Join Date
    Apr 2001
    Location
    London, Gtr London, England
    Posts
    357
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: RE: Operationalising User Forms (XP SR1)

    No problem. How do I get it to Alan?

    F

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

    Re: RE: Operationalising User Forms (XP SR1)

    By attaching it to a reply. If the file is over 100 K, create a zip file and attach that. Make sure to remove sensitive or proprietary data, or replace them with dummy data.

  9. #9
    3 Star Lounger
    Join Date
    Apr 2001
    Location
    London, Gtr London, England
    Posts
    357
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: RE: Operationalising User Forms (XP SR1)

    Oki doki, I'll do that now. Thanks.

    F

  10. #10
    3 Star Lounger
    Join Date
    Apr 2001
    Location
    London, Gtr London, England
    Posts
    357
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: RE: Operationalising User Forms (XP SR1)

    Here is the file. Thanks.

    F

  11. #11
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: RE: Operationalising User Forms (XP SR1)

    I believe your problem stems from connecting your textboxes via a Control Source property, to the worksheet. I don't think this is the effect you're after. If you select each textbox individually, and delete the control source value (e.g. =a4) then the textboxes appear to behave "normally".

    Alan

  12. #12
    3 Star Lounger
    Join Date
    Apr 2001
    Location
    London, Gtr London, England
    Posts
    357
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: RE: Operationalising User Forms (XP SR1)

    That's solved the problem, thank you. Stems from my mis-understanding of the role of ControlSource. I assumed that it was a necessary link to the spreadsheet but can now see that the VBA code takes care of that. What is the purpose of ControlSource? Thanks.

    F

  13. #13
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: RE: Operationalising User Forms (XP SR1)

    The ControlSource property facilitates a link between the value of a control (like a textbox) and a particular cell on the worksheet. One becomes more or less a realtime copy of the other, so that changing one will instantly change the other. This is different to your scenario, where you want the control over when one reflects the value of the other.

    Alan

  14. #14
    3 Star Lounger
    Join Date
    Apr 2001
    Location
    London, Gtr London, England
    Posts
    357
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: RE: Operationalising User Forms (XP SR1)

    Ok, understood and thank you.

    F

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

    Re: RE: Operationalising User Forms (XP SR1)

    Interactively: edit the caption in the label itself, not in the Properties window, and use Ctrl+Enter to start a new line.
    In code: concatenate with vbCrLf:

    Label1.Caption = "This" & vbCrLf & "That"

Page 1 of 3 123 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
  •