Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 284
Default An executable file to run a VB script?

You can't auto-enable macros from a script or from a separate VBA routine.
That's one of the main advantages of translating all the VBA to a script.
The script (if vbs files are permitted to run) will cause the same actions
but won't trigger multiple macro warnings.

Steve



"Zakynthos" wrote in message
...
Steve,

Thanks again. Not sure I have the skills to do this - but I'll research
the
methods and give it a try - can you suggest any links to help me create a
vbs
file for the script I want to run? - also would I need to 'auto-enable'
macros in this script or would it circumvent this Excel dialogue box?

"Steve Yandl" wrote:

Tony,

You could create an auto_open subroutine that would get the sequence
started
from your workbook.

Since this is an Excel programming group, I suggested the possibility of
running scripts from within VBA. However, after looking a bit more at
the
VBA you shared, I think I'd do everything from a single vbs file and just
translate what you currently have in VBA to vbScript. It may be a bit
time
consuming if macros in the other workbooks being worked on are extensive
but
you avoid a host of security roadblocks and will probably have a much
faster
process. A script can easily open multiple workbooks, move data between
them and generally duplicate the actions of any functions or subroutines
in
those workbooks.


Steve


"Zakynthos" wrote in message
...
Steve,

Great idea - thank you for the advice - sounds so simple I'll give it a
try!!!

But how do I initiate the macro within it?

Would 'Test' in the path given below be the macro name within the
'blank'
workbook 'myBook.xls' containing the script) I included in my previous
reply? And would this workbook ideally be copied to the same location
as
the
real-time daabase .exe file on which it operates?

If so I'll give it a try on my laptop at home and, although the data
export
part won't run, for obvious reasons, I can at least check whether it
will
run
under task scheduler.

Best wishes,

Tony


"Steve Yandl" wrote:

Tony,

Have you tried

excel.exe "C:\Test\myBook.xls"

???
You might have to supply the full path for excel.exe to use the
command
line
for task scheduler but I think the above will work. Personally, I
think
I'd
put the VBA in an empty workbook that I'd save as an Excel template
and
have
the data changes made in workbooks held in known locations.


Steve


"Zakynthos" wrote in message
...
Steve,

My intention is to create an .exe file that I can assign to to the
Windows
Task Scheduler but I think I'll have to give up on it as network
security
will probably log me off after 10 minutes or so - the script I've
written
is
below.

However, if I could access the scripting runtimes from within VBA
as
you
say, how would I create an .exe file to assign this script to run
through
Task Scheduler?

Many thanks,

Tony









Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
getting an excel file to run as an executable excellenze Excel Discussion (Misc queries) 1 March 24th 06 07:45 PM
How do I create an executable excel file? StephenAccountant Excel Programming 6 February 21st 06 03:48 AM
How can generate an executable file from Excel? Ofigomez Excel Discussion (Misc queries) 4 October 25th 05 01:17 PM
Convert excel file to executable file sparx Excel Discussion (Misc queries) 1 September 24th 05 01:36 PM
Excel file as an executable? James Excel Programming 4 September 7th 05 08:51 PM


All times are GMT +1. The time now is 07:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"