Values Unrecognizable After Update Userform

mucah!t

Well-known Member
Joined
Jun 27, 2009
Messages
593
Hi all,

The following code edits/adds the value of textbox2 to its corresponding cell.
The problem with it is that after updating, the values are unrecognizable and can't be used for further calculations.

Code:
    With LB
        LI = .ListIndex
        Range(.ListFillRange).Cells(LI + 1, 2).Value = TextBox2.Value
        .ListFillRange = .ListFillRange
        .ListIndex = LI
    End With

- Texttocolumns solves the problem, but recording it results in an error.
- Google offered the following solution:

Code:
Worksheets("Database").Columns("J").TextToColumns Destination:=Range("J1"), FieldInfo:=Array(1, 1)

Although it does not gives an error it makes even more values in the column unrecognizable.

Perhaps the problem can be solved in the way the value is updated in the first place instead of fixing it afterwards.

Any ideas?
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
You are putting a value from a textbox into the range.

If you actually want a number then use Val(Textbox2.Value)
 
Upvote 0
Thanks for replying Norie, That almost worked.
It saved the value indeed as a number, but for some reason all other numbers in the column became unrecognizable :confused:
 
Upvote 0
What do you mean by unrecognizable?
Does it show hash-marks? #VAL? #N/A?
A little more detail may help someone help you...
Cindy
 
Upvote 0
mucah!t

Cindy's right, more detail would help.

Are the 'unrecognizable' values the results from formatting?

Is it only caused by placing this one value on the worksheet?
 
Upvote 0
Hello,

There are no errors but it seems to be a formatting thing.
All values are aligned to the right, but after using your proposed code some of them are aligned to the left.
re-aligning, reformatting nor Texttocolumns can't get them "recognizable" again :confused:
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,875
Members
452,949
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top