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:
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:
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.
Bookmarks