PDA

View Full Version : [SOLVED:] Excel 2013 - text box glitch - tiny cursor on entry, font size fine on exit



g8r777
10-02-2013, 01:39 PM
I have baffling issue. I have an Excel file used as a form that has a number of form controls in it (text boxes, combo boxes, etc.). This form worked fine until we upgraded to Office 365.

Now when users click in certain text boxes, the cursor to enter text becomes so small that the user doesn't think they are in the text box. However, if you type some text and then exit the text box, the text returns to normal size. This makes it impossible to actually edit text.

If I go into the properties of each text box and cycle the WordWrap property to "False" and the back to "True" the problem resolves itself until I exit the workbook and then open it again. Which text boxes are affected is completely random. There is no consistency that I can see as to which boxes will be a problem when I open the workbook.

I have 2 questions:

1) Does anyone have any idea what the underlying issue is and if so how to fix it?

2) Is there a way to change the WordWrap property via VBA code? If so, I will put code in a Workbook_Open sub to loop through the text boxes and cycle the WordWrap on and off.

I have attached a sample file.

Thank you,

Brian

dja4mts
10-04-2013, 10:26 PM
I have baffling issue. I have an Excel file used as a form that has a number of form controls in it (text boxes, combo boxes, etc.). This form worked fine until we upgraded to Office 365.

Now when users click in certain text boxes, the cursor to enter text becomes so small that the user doesn't think they are in the text box. However, if you type some text and then exit the text box, the text returns to normal size. This makes it impossible to actually edit text.

If I go into the properties of each text box and cycle the WordWrap property to "False" and the back to "True" the problem resolves itself until I exit the workbook and then open it again. Which text boxes are affected is completely random. There is no consistency that I can see as to which boxes will be a problem when I open the workbook.

I have 2 questions:

1) Does anyone have any idea what the underlying issue is and if so how to fix it?

2) Is there a way to change the WordWrap property via VBA code? If so, I will put code in a Workbook_Open sub to loop through the text boxes and cycle the WordWrap on and off.

I have attached a sample file.

Thank you,

Brian

Hi,

I have experienced the same problem with a project - everything works fine in Excel 2007-10 - but one user has upgraded to 2013 and
I get this tiny, tiny text quirk.

1) i'm afraid i don't know the underlying problem. possibly a bug in 2013?

2) the workaround i have used (which you could modify) is to add the following to the textbox gotfocus event

textbox1.wordwrap = false
textbox1.wordwrap = true

Darren

IanG
10-31-2013, 02:00 AM
Hi,

I have experienced the same problem with a project - everything works fine in Excel 2007-10 - but one user has upgraded to 2013 and
I get this tiny, tiny text quirk.

1) i'm afraid i don't know the underlying problem. possibly a bug in 2013?

2) the workaround i have used (which you could modify) is to add the following to the textbox gotfocus event

textbox1.wordwrap = false
textbox1.wordwrap = true

Darren

Hi Darren

I'm a bit of a VBA amateur but im having this same issue, could you elaborate on the textbox getfocus event as i cant find that element?

Thanks

Ian

dja4mts
11-03-2013, 08:38 AM
Hi Ian,

Assuming you have added the textbox as an ActiveX control - if you open up the VBA IDE, select the Sheet or Userform that contains the textbox in the Project explorer pane.

Then in the code window, use the left-hand dropdown (at the top of the window) to select the textbox in question (it probably says general by default).
Then use the rt-hand dropdown to select the gotfocus event for the control.

This should now give you the basic skeleton code for that control & event. Just c&p the code above into the sub.

Note - you may need to change the suffix on the code depending on the actual name of your control (i.e. if it's textbox2 change to code to textbox2.wordwrap)

Note also - I'm at home, not on a pc with excel and doing this from memory!

Darren

Trebby
05-31-2016, 12:27 AM
Worked like a charm! Thank you