Running VBA from a .htm page?

  • Thread starter Steven Craig Basham
  • Start date
S

Steven Craig Basham

Hello. As you'll see very quickly I am not a web programmer. One of my
co-workers uses front page to create an intraweb site for the company. I
wrote some code in vba that will open a word document and print specific
pages from it. However, I mistakenly assumed that it would run like other
vba modules (excel, word, etc.) and allow me to place a button on the page
that will kick off my sub-routines. If it can do this, I would greatly
appreciate someone telling me what I am missing. If not... how do I go
about running macros in vba from a web page? Maybe I'm looking at it
incorrectly. Any help you can offer is greatly appreciated.

Steven Craig Basham
 
K

Kevin Spencer

Hi Steven,

No, it wouldn't work. VBA is a language for extending existing applications.
A web page is not an application. A web page is a text document that is
returned to the browser as a result of a Request to a web server or a local
HTML file.

What you're talking about is not something a web page can do. It isn't
something a web server can do. It is something only a custom application can
do. In your case, you would need to write an ActiveX control (in VB, NOT
VBA) and embed that in a web page.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
S

Steven Craig Basham

Thank you for your reply Kevin. I will look into another way to accomplish
my mission. :)
 
S

Steven Craig Basham

Kevin,
Hopefully you can point me in the right direction. I've created the
activex control I needed and used microsoft's control panel to embed it in
my webpage. It worked beautifully!!... until I tried to run the web page
from another machine. Am I correct in thinking that I will have to register
the control in every machine prior to the web page viewing? If so, it
didn't look simple... suggestions?

TIA,
Steve
 
K

Kevin Spencer

Hi Steven,

First, congratulations! Nice work.

I believe the following MSDN article , and the related sections you'll find
with it, will answer your questions. If you still need help, come on back!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
S

Steven Craig Basham

? I must've missed something: I can't find the following MSDN article you
mention. Would you mind trying again for me?

Again, thank you for all of your help!

Steven Craig Basham
 

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