Using form interactively or programmatically

D

Denis

I have a form in a separate workbook that is used by a macro in that
workbook to present a form to the user to fill out interactively for
creating some charts. This works great but it requires manual effort
and I want to automate filling out the form.

So essentially I would like to have a macro in another workbook open
this form, fill it out, and then click the OK button. I'm wondering
if this is really doable.

From what I've been able to gather by searching this newsgroup, I
would need to create a "helper" macro in the other workbook just to
open the form. But that doesn't address filling out the form data and
"clicking" the OK button.

If it is possible to fill out the form programmatically, does this
need to be done by a macro in the same workbook as the form? If so, I
could pass the data in as parameters to the helper macro and have it
fill out the form when it opens the form.

Thoughts or advice?

Denis
 
J

JLGWhiz

If the form's purpose is to populate a chart, why not just create a macro to
populate the chart and skip the form? If you can automate filling the form
that populates the chart, then is stands to reason that you can populate the
chart without the form.
 
D

Denis

If the form's purpose is to populate a chart, why not just create a macro to
populate the chart and skip the form? If you can automate filling the form
that populates the chart, then is stands to reason that you can populate the
chart without the form.

I just gave a very simplistic example. In the actual case the form
sets up creating potentially hundreds of charts and is rarely used
just to create a single chart, although it can do that.

Denis
 

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