+ Reply to Thread
Results 1 to 16 of 16

Having trouble with ActiveX Textboxes

  1. #1
    Registered User
    Join Date
    11-08-2018
    Location
    Australia
    MS-Off Ver
    Office 365
    Posts
    7

    Post Having trouble with ActiveX Textboxes

    Hi All,

    First time poster. I need assistance with a "Product Viewer" sheet I'm currently working on. I am new to the VBA side of things.

    I'll provide some background. I have over 600 products. Each product in our library has approx. 100 columns of data. All of this data is pulled from MULTIPLE sheets. These columns of data house product specs like Interest Rates and Notation information. The issue here is it's difficult to read the Notation information in it's current state (standard sheet view - it's often 800+ characters per cell). Additionally, trying to edit this information is just plain painful.

    So I have created a sheet in hopes of creating a place where you can visually see all of the information for that product, in one place and be able to edit this information.

    Here's what I've done so far: (I am in no way wedded to any of these methods, it is simply all I could manage, if you have a suggestion for a better "search" method or the like, please advise)

    I have used the INDEX / MATCH functions to find the ROW, and then manually specified the column to return the value. I have removed sensitive information from the below formulas.

    The search Formula (i'll call this the H formula because these all sit in the H column)
    Please Login or Register  to view this content.
    Cell B10 is linked with a combobox that uses "google style" searching. Used guide from Trumpexcel - excel-drop-down-list-with-search-suggestions

    Please Login or Register  to view this content.
    Column "K" is the product name column

    Please Login or Register  to view this content.
    Column "55" is the field that I wish to retrieve. These columns contain TEXT notation information and are NOT numerical.

    All of these formulas sit in cells H1, H2 etc. The formula is repeated but with different column numbers to retrieve different information from the same row of product matched.

    E.g.
    Please Login or Register  to view this content.
    Now to display the information found:
    The cells in the "H" range are linked to the ActiveX Textboxes using their "Linked Cell" property. Here's where i run into issues. If a user edits the textbox, it then removes the formula and replaces it with just text (in the H cell). I am trying to find a way to have these textboxes to be dynamically linked to the other sheet based off the search results. Is there a way to have the "Linked cell" property update whenever a search is made?

    Currently the combobox is live, and as soon as a selection is made -> B10 is updated -> and therefore INDEX / MATCH formulas kick in (H range cells). Once a search is made, and a product selected, the TEXT values are displayed in the corresponding textboxes. Approx. 8 Textboxes currently inuse (although planned for more).


    I have some ideas how I could do this but have a hit a wall on where to start.

    Some of my ideas below.

    Option 1:
    Create an "edit" command button specifically for each textbox, that modifies the "LinkedCell" property to the MATCHED cell from our INDEX / MATCH search function.

    Then create a "save" button that reverts the textbox's "LinkedCell" property back to the "H" formulas.

    This would be useful for one-by-one edits, and probably the simplest coding (I thought).

    I created the buttons in the screenshot, and then brain farted on how to do it.

    Option 2:
    Somehow create an array or string thing (not very good with VBA) so that whenever i click a singular "edit" button, all textboxes "LinkedCell" properties are modified, according to the column number specified from our "H" formulas.

    So I would search a product, see the information in the 8 textboxes, then hit the global edit button, this would change all textboxes LinkedCell properties to the ACTUAL cell. Then hit the global save button which would revert the LinkedCell properties back to the H formulas for viewing.

    Option 3: (would prefer this option to be honest)
    Stop the combobox from being a live search, and create a "search button" so when the user hits search, it finds the product using our H formula, and uses this information to update the LinkedCell properties immediately. So the user could make live changes without using any "edit" or "save" buttons.

    Sorry for the wordy post, i hope i was clear. Please advise should you require further information.

    See attached for layout screenshot.

    Please any advice here on any of the above is going to help. I. am. stuck. :D

    Thanks guys.
    Attached Images Attached Images

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Having trouble with ActiveX Textboxes

    Hi Max, nice image and all that.
    I am assuming you use the worksheet as a userform.
    I hate ActiveX elements but it can be done.
    I suggest a sample file (dummy data) with what you have so far including macros and so.
    None of us is going to 'rebuild' a form from an image .
    If you're using Office 365, will this me a shared workbook? A lot of VBA commands in shared workbooks won't work as expected

    I use Office 2016 so it won't be a problem to put something together, but, like I said, a sample file for starters (please?) then I'll see what I (or any other person here) can do for you
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Registered User
    Join Date
    11-08-2018
    Location
    Australia
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Having trouble with ActiveX Textboxes

    Thanks Keebellah. Wasn't too sure how much information you would need. It will take some time to remove sensitive information from the whole database. I will reply when I have the requested dummy file ready.

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Having trouble with ActiveX Textboxes

    Read my tip on dummy data.
    Another simple way, save a copy of you file and then remove all bu two rows of you 'database' and in those two rows, change anything that is private to dumy data.
    You don't need to do much, just something to see what's wronf with your form.

  5. #5
    Registered User
    Join Date
    11-08-2018
    Location
    Australia
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Having trouble with ActiveX Textboxes

    Hi Keebellah,

    Please see attached Dummy Data. I have removed almost everything, and left 8 test products and confirmed the combobox still works.

    Just looking for a way to use the "Product Viewer" tab as a means to input data directly into the MAD sheet tab using ActiveX textboxes. If you can think of a better way this goal could be achieved, I am definitely interested. I am in no way wedded to the current layout, method, code or anything. Just trying to create a place thcan be used for edits/viewing.

    Regards,

    Max
    Attached Files Attached Files

  6. #6
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Having trouble with ActiveX Textboxes

    Okay, I'll take a look later in the day, we're hours behind you, it's 8 AM here now

  7. #7
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Having trouble with ActiveX Textboxes

    Why not use the value attribute rather than the linked cell, that way they're disconnected from the cells - they can't overwrite them then.

    You'd be better off with a userform too as you don't really want to use ActiveX controls on worksheets at all. They're incredibly unstable have a look here https://www.google.co.uk/webhp?sourc...eet%20controls and by using them, you're asking for trouble.

  8. #8
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Having trouble with ActiveX Textboxes

    I agree entirely about the userform.
    Another thing I noticed you have set the EnterKey behaviour to False, you should set it to true so you can enter more lines of text.

  9. #9
    Registered User
    Join Date
    11-08-2018
    Location
    Australia
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Having trouble with ActiveX Textboxes

    Thanks for taking a look guys. So when you say Userform, are you referring to the buttons just above the ActiveX buttons? I thought it had to be activeX to achieve what i wanted? If there's a better way, definitely open to it.

    Not sure about the enter key thing. I remember i was doing a "password" entry for "editing" but could never get the edit function to work. So a lot of trash code in there for things i tried and stopped halfway.

    When using the Value property, how do i get that property to send to the MAD sheet? Like a "save" button that sends the value across?

    Please Login or Register  to view this content.
    do you mean something like the above? real novice here guys. Only just starting using excel a few months ago.

  10. #10
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Having trouble with ActiveX Textboxes

    For starters, here's one of many tutorials about Userform
    https://excelmacromastery.com/vba-user-forms-1/
    I honestly didn't have the time to really put effort into your post but hope to do so tomorrow.
    It's past midnight here so I'm off to bed

  11. #11
    Registered User
    Join Date
    11-08-2018
    Location
    Australia
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Having trouble with ActiveX Textboxes

    Thank you for the helpful link! That guide is helping me understand the VBA side of things. Definitely seems like userform will be the better option. I'll start familiarising myself with the userform.

    No worries Keebellah. Appreciate your input.

  12. #12
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Having trouble with ActiveX Textboxes

    It's quite a lot of coding that has to be done.
    I started but cannot develop the whole thing.
    I added a userform but no vba code to it, just the textboxes and their labels
    I am assuming that the small table to the right of your 'userform' is a summary of the data?
    I've attached the file with the userform but no intelligence added to the form's data
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    11-08-2018
    Location
    Australia
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Having trouble with ActiveX Textboxes

    Hi Keebellah,

    I do apologies, I hadn't realised how much was required to achieve my goal. I can see you created some textboxes in the user form. Its the combo box im having trouble with. Trying to get it to operate like the one I already have is proving difficult. I just don't understand the VBA side of things to code the tables into it.

    Thanks for you time and appreciate the effort.

    Max

  14. #14
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Having trouble with ActiveX Textboxes

    To be honest, I don't understand at all what you're trying to do.
    The named range DropDownlist is dynamic but the form doesn't work.
    It's a big question mark for me.

    Sorry for that

  15. #15
    Registered User
    Join Date
    11-08-2018
    Location
    Australia
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Having trouble with ActiveX Textboxes

    That's ok Keebellah. I'll come back to it after some more research. It seems this task is out of my depth.

  16. #16
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Having trouble with ActiveX Textboxes

    I think what you want is to start filtering a list by typing some text in the box, at least, that's what the formula in the named range implies, My question is why.
    If it's because you want to refine the ComboBox while typing, I can help, but the list you have now only contains identical names, of are the names shown a concatenation of more than one column?
    I'm guessing you're making the thing much more difficult than it is.
    If you attach a file with more realistic (but dummy) data I'll give it a try again, and maybe even without the userform jus the worksheet like you have it now

+ 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. Replies: 6
    Last Post: 03-16-2017, 09:14 AM
  2. [SOLVED] Display value of dynamic ActiveX control textboxes
    By ukflyer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-09-2013, 06:39 AM
  3. Working with activex Textboxes on a worksheet
    By Bishonen in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-03-2013, 06:44 AM
  4. Loop textboxes(activex)
    By sohaila in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-10-2013, 05:18 AM
  5. Having trouble with ActiveX listbox
    By burkejay in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-31-2012, 12:16 PM
  6. Trouble with Excel->Word Find/Replace on TextBoxes
    By macronoob84 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-07-2012, 04:31 AM
  7. Excel 2007 : Linking ActiveX TextBoxes
    By mike85 in forum Excel General
    Replies: 5
    Last Post: 11-23-2010, 02:14 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