StierInvest
asked on
ActiveX TextBox VBA Excel 2010
Dear Experts,
I'm having trouble to enable the user to enter a decimal number in my TextBox.
Please see code below.
Private Sub TextBox1_Change()
With TextBox1
.LinkedCell = "Sheet1!$P$2"
On Error Resume Next
ActiveWorkbook.Sheets("She et1").Rang e("P2") = CLng(Me.TextBox1)
ActiveWorkbook.Sheets("She et1").Rang e("P2").Nu mberFormat = comma
On Error GoTo 0
End With
Can someone please help.
Thanks,
K
I'm having trouble to enable the user to enter a decimal number in my TextBox.
Please see code below.
Private Sub TextBox1_Change()
With TextBox1
.LinkedCell = "Sheet1!$P$2"
On Error Resume Next
ActiveWorkbook.Sheets("She
ActiveWorkbook.Sheets("She
On Error GoTo 0
End With
Can someone please help.
Thanks,
K
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Imnorie.
That seems to work, is there then a quick way of converting the text to a number where the cell is linked to?
Best,
K
That seems to work, is there then a quick way of converting the text to a number where the cell is linked to?
Best,
K
When would you want that to happen?
ASKER
Well was hoping as soon as the user enters a number. Is there not a better way by not "*1" all of the entries?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect thank you
ASKER
Still no luck. As soon as I start with a "." it lets me enter it, but not "5.56" for example.
Any other ideas?
Thanks,
K