Stead
Jun 16th, 2005, 06:31 PM
Hi, i've searched the net for a while now, i have had a quick search on the forums but can't seem to find anything, my problem is this
i have an exe file controlling excel, idealy i would like to keep as much as the code as possible into the exe, there are serveral reasons for this :)
is there a way from vb to call up an excel macro, or from excel to call a function within the program, i would say my level is intermediate
the code i have for vb is
Public xl As New Excel.Application
then to manipulate excel i'm just using xl.Application.<command>
i tried putting in the macro name as you would call a macro from excel but it doesn't seem to work :( if anyone has any idea how to do this, or if it can even be done, i would most appricate it. its more important for me to be able to run a excel macro from vb, although it would be nice to do the other way around, it would be amazing if its possible to share variables bewteen the too, although i'm thinking thats going way to far/advanced for me
thanks in advance!
i have an exe file controlling excel, idealy i would like to keep as much as the code as possible into the exe, there are serveral reasons for this :)
is there a way from vb to call up an excel macro, or from excel to call a function within the program, i would say my level is intermediate
the code i have for vb is
Public xl As New Excel.Application
then to manipulate excel i'm just using xl.Application.<command>
i tried putting in the macro name as you would call a macro from excel but it doesn't seem to work :( if anyone has any idea how to do this, or if it can even be done, i would most appricate it. its more important for me to be able to run a excel macro from vb, although it would be nice to do the other way around, it would be amazing if its possible to share variables bewteen the too, although i'm thinking thats going way to far/advanced for me
thanks in advance!