Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Compile error in hidden module


Hi,

I have password protected my excel macros and thus they are hidden fro
others that use it.

However when there is a 'compile error' I automaticly receive an erro
message
"Compile error in hidden module:Module1".

Is there any way that I can change that error message to read somethin
like this :-

"Complile error - contact Bernz and advise exactly what you were doin
at the time of the error message"

Cheers,
Bern

--
Bernz
-----------------------------------------------------------------------
BernzG's Profile: http://www.excelforum.com/member.php...fo&userid=2294
View this thread: http://www.excelforum.com/showthread.php?threadid=38819

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Compile error in hidden module

I don't think you can intercept this message and make it do what you want.

In fact, I don't think you can do much with a compile error.

But you could compile your project before you release it to others.

Inside the VBE
Debug|Compile VBAProject




BernzG wrote:

Hi,

I have password protected my excel macros and thus they are hidden from
others that use it.

However when there is a 'compile error' I automaticly receive an error
message
"Compile error in hidden module:Module1".

Is there any way that I can change that error message to read something
like this :-

"Complile error - contact Bernz and advise exactly what you were doing
at the time of the error message"

Cheers,
Bernz

--
BernzG
------------------------------------------------------------------------
BernzG's Profile: http://www.excelforum.com/member.php...o&userid=22949
View this thread: http://www.excelforum.com/showthread...hreadid=388193


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Compile error in hidden module

recipient may still get the compile errors.
if he has a different excel version, or missing references to activex
objects/libraries)




--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Dave Peterson wrote :

I don't think you can intercept this message and make it do what you
want.

In fact, I don't think you can do much with a compile error.

But you could compile your project before you release it to others.

Inside the VBE
Debug|Compile VBAProject

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Compile error in hidden module

Good point.

keepITcool wrote:

recipient may still get the compile errors.
if he has a different excel version, or missing references to activex
objects/libraries)

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam

Dave Peterson wrote :

I don't think you can intercept this message and make it do what you
want.

In fact, I don't think you can do much with a compile error.

But you could compile your project before you release it to others.

Inside the VBE
Debug|Compile VBAProject


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Compile error in hidden module


Hi,

Thanks for this.

Yes compile errors should be picked up in the first place when creating
and testing the macro - should have realised that.

I got it wrong in that I was wanting the intercept and replace a
"runtime" error message when a user does something that I have not
thought of or tested for.

Example of the error message:-

"Microsoft Visual Basic
Run time error ###########
Automation error
The error invoked has been disconnected from its clients"

Also exited completely out of Excel - stating reporting error

Can this message be replaced with my own message as stated previously.

Cheers,
Bernz


--
BernzG
------------------------------------------------------------------------
BernzG's Profile: http://www.excelforum.com/member.php...o&userid=22949
View this thread: http://www.excelforum.com/showthread...hreadid=388193



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Compile error in hidden module

You could add some error handling to each sub:

option explicit
sub mysub()

on error goto errhandler:

'do lots of stuff

exit sub

errhandler:
msgbox err.number & vblf & err.description

end sub



BernzG wrote:

Hi,

Thanks for this.

Yes compile errors should be picked up in the first place when creating
and testing the macro - should have realised that.

I got it wrong in that I was wanting the intercept and replace a
"runtime" error message when a user does something that I have not
thought of or tested for.

Example of the error message:-

"Microsoft Visual Basic
Run time error ###########
Automation error
The error invoked has been disconnected from its clients"

Also exited completely out of Excel - stating reporting error

Can this message be replaced with my own message as stated previously.

Cheers,
Bernz

--
BernzG
------------------------------------------------------------------------
BernzG's Profile: http://www.excelforum.com/member.php...o&userid=22949
View this thread: http://www.excelforum.com/showthread...hreadid=388193


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Compile error in hidden module


Thanks Dave

--
Bernz
-----------------------------------------------------------------------
BernzG's Profile: http://www.excelforum.com/member.php...fo&userid=2294
View this thread: http://www.excelforum.com/showthread.php?threadid=38819

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
compile error in hidden module mikesteven Excel Discussion (Misc queries) 2 October 30th 08 01:00 AM
compile error in hidden module Gary M Excel Discussion (Misc queries) 0 July 31st 07 09:22 PM
compile error in hidden module..... Patrick Excel Programming 0 May 11th 05 09:11 PM
compile error in hidden module Paul B[_7_] Excel Programming 2 December 12th 03 06:13 PM
Compile error in hidden module Paul Excel Programming 3 November 17th 03 09:56 PM


All times are GMT +1. The time now is 12:15 AM.

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"