+ Reply to Thread
Results 1 to 15 of 15

ComboBox to accept user input

  1. #1
    Registered User
    Join Date
    02-29-2012
    Location
    Chicago, USA
    MS-Off Ver
    Excel 2010
    Posts
    19

    ComboBox to accept user input

    Excel 2010 running under Windows7. I have added a ComboBox to a chart via Developer/Insert. I have it working in the drop-down list mode, but what I really need is for it to accept user input. How do I do that? I expected that feature to be something on the format control options didn't find anything there. If I need to do it through VBA, that is fine but so far I haven't figured it out.

    Since I don't need the drop down list, I thought I could use the Text Field form control from the Developer/Insert path but for some reason it is ghosted out.

    Any help is appreciated.

  2. #2
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: ComboBox to accept user input

    Hello
    If you want a text box to enter user input then you'll have to use the Active X controls under Developer/Insert.

    Hope this helps

  3. #3
    Registered User
    Join Date
    02-29-2012
    Location
    Chicago, USA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: ComboBox to accept user input

    Thanks for the quick response and pointing me in a better direction. However, I still have a problem. Should I be able to place and Active-X control on a chart? I can place them on a data sheet but if I am on a chart, they are not selectable from the Developer/Insert dropdowns. Or is there something wrong in my Excel set up?

    Problem Background: I have a dataset with thousands of rows of data and when displayed on a basic chart, there is too much data to view any detail. The x-axis is time of day, HH:MM:SS. I added zoom and pan functions via slider controls (form control) to control the amount of data displayed. However while I can select a starting row with the first slider and select the number of rows to display with the second slider, it is erratic. Most of the time it zooms fine but sometimes if I try to add a few more rows to the chart, say 10, it will completely redefine my x-axis to take it outside the limits of the data. The data may start at 11:00 AM but the chart will redefine the x-axis and start at 00:00.

    I think the problem with this approach is that the data may have blank lines. The x-axis time has data every two seconds, normally. However, if there is a break in the data, a blank line is created so that graph traces show a skip. With the x-axis limits set to Auto, it probably is interpretting the blank as zero time. I guess a solution here is to check the data and fix the x-axis base on it. (But a better way may be to let the user enter the x-axis time parameters as suggested in the next paragraph.)

    Since that wasn't working quite right, I then decided to try the ComboBox or Text input to allow the user to enter a starting and ending time, in HH:MM format. I know they could just right-click on the x-axis and enter new lower and upper limits, but those numbers are in fractions of 24 hours and not everyone wants to or is comfortable doing it that way.

    The original data set is very large but I could try to cut it down to a smaller file and post it here if that would help.

    Thanks in advance for any help.
    Last edited by Robert Woell; 04-01-2012 at 11:55 AM. Reason: additional information in paragraph 3

  4. #4
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: ComboBox to accept user input

    Hi
    Yes it would certainly help if you could upload a sample file, so myself or other forum members can get a firm idea of the problem. A sample with no sensitive data should suffice. I find that members who post an example file often get more help because a picture (or workbook) paints a thousand words.

    DBY

  5. #5
    Registered User
    Join Date
    02-29-2012
    Location
    Chicago, USA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: ComboBox to accept user input

    I am getting an error when I try to upload the xlsm file, size 836K. What is the size limit? The FAQ section says there are allowable extensions and sizes but does not say what that size limit is.

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: ComboBox to accept user input

    Best try zipping the file first before uploading.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  7. #7
    Registered User
    Join Date
    02-29-2012
    Location
    Chicago, USA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: ComboBox to accept user input

    No luck. I re-sampled the file to get it down to 202K and then zipped it down to 197K. Still errors out and won't save.

  8. #8
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: ComboBox to accept user input

    Hello Robert
    I see you're having trouble uploading your file. You should be able to load files up to 1,000K in excel formats. Have you tried uploading your reduced file without it zipped? Maybe it's the Zip format causing a problem.

    DBY

  9. #9
    Registered User
    Join Date
    02-29-2012
    Location
    Chicago, USA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: ComboBox to accept user input

    I have tried both zipped and unzipped. But will try again. Still failed and I get an error on Excel Forum of 500

    [IOErrorEvent type= “ioError” bubbles=false cancelable=false eventPhase=2 text=”Error #2038”]

    I may try sending it from my home computer just in case something is preventing the up load from my work computer.

  10. #10
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: ComboBox to accept user input

    Which browser are you using? Try using a different browser.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  11. #11
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: ComboBox to accept user input

    Robert,

    Please try uploading the file again. It should work now.

  12. #12
    Registered User
    Join Date
    02-29-2012
    Location
    Chicago, USA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: ComboBox to accept user input

    Here is a sample file, 9 columns by 5192 rows. There are blank rows at 7, 2992, 3220 caused by gaps in time.

    The controls are two sliders, one to pick the starting point in the graph and the other to select the number of rows to be included. The button "default" runs a macro to set the graph x-axis limits to their normal fixed defaults while the "custom" button sets the x-axis limits to automatic. The combobox on the right was my first attempt at allowing the user enter x-axis limits.

    The two slider controls refer to cells $C$1 and $C$8 on sheet GC. Right now as saved they refer to a starting row of 1205 and an ending row of 4720 (the sum of C1 and C8). If you click on the Zoom slider control right arrow it will give an ending row of 4750 and rescale the graph to start at 00:00. That is puzzling behavior since the blank lines are within the first limits and that doesn't change when the additional data is included.

    Anyway, back to the original question, should I be able to put Active X controls on the chart or can I only use them on the data sheet?

    Thanks in advance for any help
    Attached Files Attached Files

  13. #13
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: ComboBox to accept user input

    Hello Robert
    I've been looking at your file and as suspected you cannot put Active X controls on to Charts. If you want the user to input a specific start time for your chart X axis data, then you could provide the user with a VBA user form. As an example, on my attachment of your original file I've added a chart of my own (Chart1) and its own data link (Sheet1) for you to consider. Click the Enter Time button to load the form.There's also a scroll to move through the date. Does this do anything like what you require?

    Regards
    DBY
    Attached Files Attached Files
    Last edited by DBY; 04-03-2012 at 10:20 AM. Reason: Amended attachment

  14. #14
    Registered User
    Join Date
    02-29-2012
    Location
    Chicago, USA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: ComboBox to accept user input

    Thanks for the example, it does do what I wanted it to do.

    Last night I started down a different path and that was to use the slider controls to pick the time out of column B. That is then used in a macro to set the x-axis limits. Not sure yet which method I will use in the end but in any case, I have learned something more about Excel. I will try to post an example sheet when I close this out.

    I still can't believe you can put Active-X controls on a chart. I blame Bill Gates!

  15. #15
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: ComboBox to accept user input

    Yes it does seem strange, that appears to be the case. But maybe some charting guru on the forum knows the way. Look forward to seeing your finished product. Sorry I couldn't be more help but I think your charting knowledge is greater than mine.
    Regards
    DBY

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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