open excel and run macro on button click

V

VbUser25

hi..

i have a form
i accept some user inputs in the form. there is a link on the form from
where i open the excel file in the same browser (not in a new
page...simply using a href. i am also accepting input from the user in
the excel.

now i want to save the data in excel as well as on asp form.
i can save directly thru vba code in excel to the db. but suppose the
user comes back to the form and somehow doesnt click the submit button
of the asp form to save the data. then it would mean that i saved a
certain piece of data in the db thru excel and the other relevant data
didnt get saved at all!

so i revised my approach. now what i want is that when i click the
submit button on the form i want to save the excel data also.

for this what i am doing is...when i open the excel template i let user
enter data inside it and then i will let him a copy of the excel file on
his machine(cleint machine). so in the end when the user clicks the
submit button i will
1. save the form data in database
2. open the excel file stored in clients machine
3. run a procedure inside it whihc save the data in the db

can i open the excel file on button click on asp form and then run a
macro in the excel file?
 
B

BenM

It has been a while since I have been concerned with VBA, but couldn't you
set a macro to simply run when the file loads? This would be similar to the
onload event, etc....
 

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

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top