Need help with an ActiveX TextBox

%3CLINGO-SUB%20id%3D%22lingo-sub-3344296%22%20slang%3D%22en-US%22%3ENeed%20help%20with%20an%20ActiveX%20TextBox%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3344296%22%20slang%3D%22en-US%22%3E%3CP%3ECan%20anyone%20give%20me%20advice%20as%20to%20how%20I%20would%20stop%20my%20ActiveX%20TextBox%20from%20resizing%20the%20font%20inside%20the%20box%20every%20time%20I%20click%20outside%20of%20the%20box%20and%20back%20inside%20the%20box%3F%20The%20TextBox%20border%20also%20appears%20to%20get%20larger%20as%20well.%20Here%20are%20three%20photos%20showing%20what%20I%20mean.%20The%20first%20photo%20is%20when%20I%20have%20just%20inserted%20the%20ActiveX%20TextBox%20and%20how%20it%20looks%20before%20I%20do%20anything.%20The%20second%20photo%20shows%20the%20size%20of%20the%20font%20after%20I%20have%20clicked%20outside%20the%20TextBox%20into%20any%20cell%20and%20then%20click%20back%20into%20the%20TextBox.%20The%20third%20photo%20shows%20how%20the%20font%20has%20grown%20again%20after%20I%20clicked%20outside%20the%20TextBox%20again.%20TIA%20for%20any%20help%20or%20suggestions%20you%20might%20have.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22How%20textbox%20appears%20before%20I%20do%20anything%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F370202iEDC577B8247BDFF6%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%221.jpg%22%20alt%3D%22How%20textbox%20appears%20before%20I%20do%20anything%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EHow%20textbox%20appears%20before%20I%20do%20anything%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22After%201%20click%20outside%20of%20textbox.%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F370203i51F19F9DACC587A7%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222.jpg%22%20alt%3D%22After%201%20click%20outside%20of%20textbox.%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EAfter%201%20click%20outside%20of%20textbox.%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22after%20two%20clicks%20outside%20of%20textbox.%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F370201iBE3C44B07C1E123F%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%223.jpg%22%20alt%3D%22after%20two%20clicks%20outside%20of%20textbox.%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3Eafter%20two%20clicks%20outside%20of%20textbox.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3344296%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3344809%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20help%20with%20an%20ActiveX%20TextBox%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3344809%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1384924%22%20target%3D%22_blank%22%3E%40cksmy%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20don't%20have%20a%20clue%20why%20that%20happens%2C%20but%20I%20wonder%20why%20you're%20using%20a%20text%20box.%20Why%20not%20let%20the%20user%20enter%20the%20search%20term%20in%20a%20cell%3F%20You%20can%20use%20the%20Worksheet_Change%20event%20procedure%20to%20handle%20changes%20in%20the%20cell.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

Can anyone give me advice as to how I would stop my ActiveX TextBox from resizing the font inside the box every time I click outside of the box and back inside the box? The TextBox border also appears to get larger as well. Here are three photos showing what I mean. The first photo is when I have just inserted the ActiveX TextBox and how it looks before I do anything. The second photo shows the size of the font after I have clicked outside the TextBox into any cell and then click back into the TextBox. The third photo shows how the font has grown again after I clicked outside the TextBox again. TIA for any help or suggestions you might have.

 

How textbox appears before I do anythingHow textbox appears before I do anythingAfter 1 click outside of textbox.After 1 click outside of textbox.after two clicks outside of textbox.after two clicks outside of textbox.

1 Reply

@cksmy 

I don't have a clue why that happens, but I wonder why you're using a text box. Why not let the user enter the search term in a cell? You can use the Worksheet_Change event procedure to handle changes in the cell.