+ Reply to Thread
Results 1 to 2 of 2

ComboBox & Tick Mark Issues

  1. #1
    Registered User
    Join Date
    02-15-2011
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1

    Question ComboBox & Tick Mark Issues

    Hi.

    I'm in the process of attempting to write a VBA code that will automatically create a graph for me and standardize its formatting. I'm new to Excel programming and I'm having trouble getting a few things to code correctly. Any help that anyone could offer would be greatly appreciated.

    First, is there any way to control the size of axis tick marks using VBA? More specifically, I'd like to make the tick marks longer.

    My second problem requires a bit of explanation - I'll try to be as clear as possible, but please let me know if what I've written is confusing. I've created a user form with two combo boxes (one for the x-axis and one for the y-axis) that each contain the names of parameters that I'd like to plot (e.g., Sr concentration, Ta concentration, Hf concentration, Zr concentration, etc.). Let's say, for instance, that I select Zr concentrations for the x-axis and Ta concentrations for the y-axis. I'd like to program my code to make a scatter plot of Ta vs. Zr with three data series. My x and y axis data series ranges would look something like this:

    Please Login or Register  to view this content.
    What I would like to be able to do is to link the columns (rows will stay the same) in the above code to values in the combo boxes. So, for instance, I'd like to link Zr to column H, Ta to column K, Sr to column A, etc. The only way that I've been able to envision doing this is to code a bunch of If Then statements, such as:

    Please Login or Register  to view this content.
    etc.

    However, doing this would require a huge amount of code, as I have numerous plotting parameters and I would have to repeat the above process for the y-axis and for each data series. Is there a more efficient way to link specific columns to combo box values?

    Thanks in advance.
    Last edited by dannyflanny; 03-11-2011 at 02:52 PM.

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

    Re: ComboBox & Tick Mark Issues

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Hope that helps.

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

    Free DataBaseForm example

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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