By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,268 Members | 1,371 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,268 IT Pros & Developers. It's quick & easy.

open excel and run macro on button click

P: n/a


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?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 22 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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....
Jul 22 '05 #2

P: n/a

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


How "set a macro to simply run when the file loads?"
What is "onload event, etc ..."
I test asp on IIS as localhost and I get still info about errors when
try to communicate asp with excel. What could be the reason
-
Gosi
-----------------------------------------------------------------------
Posted via http://www.codecomments.co
-----------------------------------------------------------------------

Jul 22 '05 #3

P: n/a

VbUser25 wrote:
[b]hi..
can i open the excel file on button click on asp form and then run a
macro in the excel file?
And? Can you???
I have the same problem and if you could publish what you´ve foun
would be great :

-
Gosi
-----------------------------------------------------------------------
Posted via http://www.codecomments.co
-----------------------------------------------------------------------

Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.