Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Programmatically detect a syntax error in a macro?

I'm working on forensice sofware, using vb6, that opens Excel spreadsheets
and generates images of all possible combinations of available data. This
means that one thing we have to do is run the available macros. The problem
is that if we encounter a macro that contains a syntax error the Excel VBA
window opens up and processing doesn't return to our application until the
syntax error is resolved. We would prefer just to note that the particular
macro contains an error and we will just bypass it. Is there a way to detect
syntax errors without having Excel open anything up?

Thanks,

Jeff Beem
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Programmatically detect a syntax error in a macro?

Nothing that I know of. The error handling in VB6 and VBA is a little cheesy.
Errors are not pushed up the stack, they die with the procedure. If you can
move to vb.net you might be able to resolve this as it uses more classical
error handling.

"Jeff Beem" wrote:

I'm working on forensice sofware, using vb6, that opens Excel spreadsheets
and generates images of all possible combinations of available data. This
means that one thing we have to do is run the available macros. The problem
is that if we encounter a macro that contains a syntax error the Excel VBA
window opens up and processing doesn't return to our application until the
syntax error is resolved. We would prefer just to note that the particular
macro contains an error and we will just bypass it. Is there a way to detect
syntax errors without having Excel open anything up?

Thanks,

Jeff Beem

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
need to detect syntax in value J.Parker Excel Discussion (Misc queries) 1 February 13th 10 05:09 AM
Syntax error while applying a formula in a macro pol Excel Discussion (Misc queries) 3 December 1st 08 07:21 PM
COUNTA function causing syntax error in macro... Birmangirl Excel Worksheet Functions 4 February 6th 07 04:04 PM
Macro syntax error when running query rrmando Excel Programming 0 July 26th 04 10:42 PM
Programmatically detect wrod-wrap? J S Excel Programming 0 September 11th 03 08:45 PM


All times are GMT +1. The time now is 07:17 PM.

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

About Us

"It's about Microsoft Excel"