Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Start my application when a .txt is added to or updated in aparticular directory

The basics of my application:
It takes a tab delimited .txt file created from exporting a report
from Quicken, and creates an Excel workbook, doing all kinds of
sorting, calculations, and formatting based upon user input.

Besides selecting menu options from my custom menu, I would like to
give the option to run my wizard on the event that a any .txt file in
a specified directory is updated or added.

I have a few ideas based upon all the documentation I've read and
searches I've done:
-Use Automation/OLE to access an object in a system or Quicken
library, and an event associated with that object. I've attached a
few references to other libraries that might have something I could
use. But there are so many I don't know where to start. And I can't
see the newly attached libraries of objects in my object model
reference (not used to my new Excel 2007 environment).
-Something totally different, maybe create a Connection to a
particular .txt file (this way it would only work for one file being
updated rather than a new file created in that directory), and use the
IRTDUpdateEvent.UpdateNotify?
-Could I use the workbook Sync event somehow?

Also, I'd like to somehow keep this small part of the application (the
part that displays a simple dialog box that asks the user if she wants
to run my application for the file that was just created or updated,
upon the event of a file being added or updated in a particular
directory) running/available, without the user opening Excel.

It seems like it would be a common need, to run an event handler
procedure upon the event of a non-Excel file being created or updated,
but I haven't found any questions about it.

I would sure appreciate any advice from someone who has done this or
knows how to do it... thank you.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Start my application when a .txt is added to or updated in aparticular directory

Maybe...

Use code from Randy Birch's VBNet site to use API calls to watch a folder.
http://www.mvps.org/vbnet
Search for FindChangeNotification.



wrote:

The basics of my application:
It takes a tab delimited .txt file created from exporting a report
from Quicken, and creates an Excel workbook, doing all kinds of
sorting, calculations, and formatting based upon user input.

Besides selecting menu options from my custom menu, I would like to
give the option to run my wizard on the event that a any .txt file in
a specified directory is updated or added.

I have a few ideas based upon all the documentation I've read and
searches I've done:
-Use Automation/OLE to access an object in a system or Quicken
library, and an event associated with that object. I've attached a
few references to other libraries that might have something I could
use. But there are so many I don't know where to start. And I can't
see the newly attached libraries of objects in my object model
reference (not used to my new Excel 2007 environment).
-Something totally different, maybe create a Connection to a
particular .txt file (this way it would only work for one file being
updated rather than a new file created in that directory), and use the
IRTDUpdateEvent.UpdateNotify?
-Could I use the workbook Sync event somehow?

Also, I'd like to somehow keep this small part of the application (the
part that displays a simple dialog box that asks the user if she wants
to run my application for the file that was just created or updated,
upon the event of a file being added or updated in a particular
directory) running/available, without the user opening Excel.

It seems like it would be a common need, to run an event handler
procedure upon the event of a non-Excel file being created or updated,
but I haven't found any questions about it.

I would sure appreciate any advice from someone who has done this or
knows how to do it... thank you.


--

Dave Peterson
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
excel start directory katto01 Excel Worksheet Functions 1 June 9th 09 12:43 PM
Macro to Start an Application Joe Teixeira Excel Discussion (Misc queries) 3 April 26th 06 06:36 PM
How to start an application from Excel VBA [email protected] Excel Programming 4 April 18th 06 05:18 PM
Application.Path (Getting the directory that my workbook is in) Richard1284[_8_] Excel Programming 1 May 25th 04 01:56 PM
Browse For Folder start directory Todd Huttenstine Excel Programming 2 May 12th 04 02:24 PM


All times are GMT +1. The time now is 06:02 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"