Strange character in textbox

Mansel160

Board Regular
Joined
Oct 22, 2006
Messages
128
Hi All,

I wonder if someone would have the answer to an annoying problem.

I have created a userform for retrieving and storing information which has been working for over a year now. But, every now and then the TAB key does not take the user out of the textbox and move them on to the next one, it simply TABS within the texbox, everytime this happens a strange character like a little square appears in the cell after the data. however when I cut and paste the cell here, it shows up as the following "Caswell "

This was cut and paste directly from the Excel spreadsheet and shows as Caswell with a small square after it in the spreadsheet.

Any help would be appreciated.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

cornflakegirl

Well-known Member
Joined
Nov 4, 2004
Messages
2,023
Use =CODE(RIGHT(A1,1)) where A1 contains the data with the tab thing on the end. This will give you the ASCII code for the symbol. Then you can use a find and replace method to get rid of it.
 
Upvote 0

Mansel160

Board Regular
Joined
Oct 22, 2006
Messages
128
Hi Emma,

Many thanks for that info. I will certainly use it to save a lot of time.

I sure would love to know why it is happening though.

Kind regards

Max
 
Upvote 0

Mansel160

Board Regular
Joined
Oct 22, 2006
Messages
128
Hi Emma,

Thanks for that but I don't think it can be the code, it is so infrequent maybe once in 100 or so records. The program is used 7 days a week and there is no pattern to it. I have read that it is an office 2000 type issue and not the coding, who knows?

I tried your suggestion and the code for the characture is 9 (which is Ascii for TAB), the trouble is because some of my fields are numeric I can't use "Replace All" I will have to step through! Pain.

I guess it's something that I will just have to live with.

Many thanks anyway.

Max
 
Upvote 0

Mansel160

Board Regular
Joined
Oct 22, 2006
Messages
128
Hi Emma,

Thanks for that I will give it a go.

Kind regards

Max
 
Upvote 0

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,358
Office Version
  1. 365
Platform
  1. Windows
Max

I think you need to look into the properties of this textbox.

eg EnterKeyBehaviour, TabKeyBehaviour, Multiline etc
 
Upvote 0

Mansel160

Board Regular
Joined
Oct 22, 2006
Messages
128
Hi Norie,

Thanks for the input, the properties for all text boxes are set correctly. As I said it is extremely random and very rare that it happens (probably 1 in 100 records) but annoying all the same. Many thanks for your response anyway.

Kind regards

Max
 
Upvote 0

Forum statistics

Threads
1,191,420
Messages
5,986,475
Members
440,031
Latest member
davidvillegasr

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
Top