+ Reply to Thread
Results 1 to 6 of 6

textbox blank until I type in it

  1. #1
    Forum Contributor
    Join Date
    09-09-2014
    Location
    England
    MS-Off Ver
    2013
    Posts
    102

    textbox blank until I type in it

    Hello,

    I have created a vba code to lookup data and then return it in a textbox. It works perfectly once I have typed in the textbox but appears blank before I do so.

    Any suggestions or ideas to solve this?

    Thanks

    Z

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: textbox blank until I type in it

    Hi,

    What are you expecting? And is this a Forms Control or an Activex control.

    Are you implying it should already contain a value when you activate the text box. In which case where is the text you want?
    If it's a worksheet cell then try using the Linked Cell property.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    09-09-2014
    Location
    England
    MS-Off Ver
    2013
    Posts
    102

    Re: textbox blank until I type in it

    Hi Richard,

    It is a forms control and yes, once I select an item in my combobox I'd like the information in my textbox to show straight away.

    Z

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: textbox blank until I type in it

    Which control is it?

    On my system although there is a Textbox control on the Forms menu it's greyed out, which I had always assumed was standard. Are you saying you can add this textbox or is it the similar Label control to which you refer?

  5. #5
    Forum Contributor
    Join Date
    09-09-2014
    Location
    England
    MS-Off Ver
    2013
    Posts
    102

    Re: textbox blank until I type in it

    Ah apologies, it's an active x control. My mistake.

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: textbox blank until I type in it

    In that case you can use either the Linked Cell property of the control if you want to feed it from a workbook cell, or if it should contain some text that exists in a VBA variable then use that the Form Initialise event to populate the textbox as the form is opened.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Type in TextBox after referencing a different Textbox
    By WAYNE005 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-05-2014, 06:50 PM
  2. VBA Code To Filter Listbox As You Type In A Textbox
    By Benjamin2008 in forum Excel General
    Replies: 3
    Last Post: 12-20-2013, 08:57 PM
  3. [SOLVED] Type mismatch on a date textbox when leaving it blank
    By shardin in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-26-2012, 05:25 AM
  4. Convert text in textbox as i type
    By pblnrao in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-22-2011, 03:37 AM
  5. Textbox Content Type
    By KingG in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-12-2006, 10:30 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1