View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jon Peltier Jon Peltier is offline
external usenet poster
 
Posts: 6,582
Default Userform with Excel chart sheet

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
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"John Easton" wrote in message
...
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