Userform with Excel chart sheet

G

Guest

Hello all -

I am trying to make a userform that allows a user to dynamically change the
x axis of a scatter graph sheet (not imbedded on a worksheet). I have the
user form created and coded, but run into a problem:

In the chart_activate() subroutine, I have two lines of code (not counting
sub/ end sub):
load flowxcontrol
flowxcontrol.show

where flowxcontrol is my userform (I changed the name, because I have
another userform). I have code for the userform defining the operation and
initialization of the scrollbar and textbox on the form.

When I click on the tab for the chart sheet, two things happen:
1) I get a "Run Time Error '1004' application-defined or object-defined
error" with the load flowxcontrol line highlighted (commenting out this line
just means the ().show line gets highlighted instead)
2) The x axis on the graph changes to reflect the initialization of the
userform elements, just like I'd like it to.

The user form never appears. But the graph axis changes just like the code
on the user form says it should.

I hate to ask an overly broad question, but what the heck is going on?

Thanks in advance, John
 
J

Jon Peltier

Step through the code (F8 key in the VB Editor), and watch where the error
in the form initialization routine takes place. When the error occurs it
returns control back to whichever line of code loaded the form.

- Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top