OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 25-10-2004, 09:48
Rick Randall
Guest
 
Posts: n/a
Default Adding a Reference on a pwd protected macro

hi-
I have distributed a macro to some people in another location. I password protected this macro so no one can see or alter the code. The macro worked fine for a while but now it doesn't. It gets the following error message, "compile error in hidden module: Converter".
I think they need to turn on a Reference...(Microsoft Forms 2.0 Object Library) I told them to do this but they can't seem to add this reference because the macro is protected. Help!!!
Reply With Quote
  #2  
Old 25-10-2004, 10:13
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,941
Blog Entries: 4
Default Re: Adding a Reference on a pwd protected macro

Rick,

I don't think this is MS Form Designer library which is not available. Did you use any of the custom controls on your form (not those provided by VBA, but some 3rd party OCX controls?). If so, chances are that your customers don't have that control anymore. All they need to do is to (re-)install it. Go to the project on your machine and see what other 3rd party libraries are referenced for the project (in both Tools>References for the project [GMS file] and in Tools>Additional Controls for each form in the project).

I hope this helps.
Reply With Quote
  #3  
Old 25-10-2004, 10:39
Rick Randall
Guest
 
Posts: n/a
Default

so...all they need to do is re-install the macro?
Reply With Quote
  #4  
Old 25-10-2004, 17:00
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,941
Blog Entries: 4
Default

Quote:
Originally Posted by Rick Randall
so...all they need to do is re-install the macro?
It all depends on what you mean by that... What do you ship in the installer? Do you use any custom controls? Do you provide the OCX files as part of your setup?
Reply With Quote
  #5  
Old 26-10-2004, 07:18
Rick Randall
Guest
 
Posts: n/a
Default

My macro is based on the FileConverter macro that comes with CorelDraw. I just stripped it down so that the conversion settings are hard coded instead of user defined. I delivered it by just sending the .gms file and telling them to save it in the GMS folder.
Everything worked great for two weeks then it got buggy.
I gave away my password to unlock the code and found that the error was in a line of code that I wrote to time out the macro in 6 months. Unfortunately, the folks using it live in India and they all have their system date set differently than my code would allow. I just removed this function and it worked. (I thought)
Today they are getting an error when they click on the browse button on the source section form. (see FileConverter macro)
What's crazy is that everything worked great for the first two weeks, then all of the sudden it quit working!!! I really don't want to give away all of my code. What can I do to ensure that it works everytime?
Reply With Quote
  #6  
Old 26-10-2004, 13:01
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,941
Blog Entries: 4
Default

Apparently there are issues with your code. The fact that it worked for two weeks doesn't mean that the problem just creeped in later. It was there all along, just the condition to trigger it wasn't occuring (e.g. they never browsed a network drive or they didn't try to pick up a hidden folder or maybe the file name contained Unicode characters which couldn't be represented as an ANSI string, or stuff of that sort).

What I do in situations as these is I ask the customer the exact steps it took to reproduce the problem, maybe some sample files, etc and then investigate the problem on my end. Fix the code and ship another version.
Reply With Quote
  #7  
Old 26-10-2004, 13:03
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,941
Blog Entries: 4
Default

One more thing, CorelDRAW never saves back a protected macro module, so chances that it gets corrupted over time are slim to none (except some virus just goes and chops off files on the hard disk).
Reply With Quote
  #8  
Old 26-10-2004, 14:05
Rick Randall
Guest
 
Posts: n/a
Default

If this macro was an add-in would it resolve the references issue?
Reply With Quote
  #9  
Old 26-10-2004, 19:07
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,941
Blog Entries: 4
Default

Quote:
Originally Posted by Rick Randall
If this macro was an add-in would it resolve the references issue?
What reference? My understanding is that the code has an error (bug) in it. An this would be in either add in or a macro - an error is an error.

As I suggested, ask your customers to reproduce the steps to recreate the condition which leads to the problem and then investigate the issue yourself. If everything is done correctly, you will have no issues.
Reply With Quote
  #10  
Old 27-10-2004, 09:27
Rick Randall
Guest
 
Posts: n/a
Default

I think initially it did have a bug. ...but now I think it is an issue with references. I would like to make this an add-in because it with be compiled and no one can see my code and it will make deploying it easier.
My next question is can I create this add-in with Visual Studio .NET?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I make a macro time out? Rick Randall CorelDRAW/Corel DESIGNER VBA 6 09-02-2005 11:16
An Idea for a handy and easy to make macro vallentin Macros/Add-ons 2 16-03-2004 11:35
New macro to clip curves w.r.t. a border Gerard Hermans Macros/Add-ons 0 09-06-2003 07:50
How to draw macro on toolbar? lywlywlywlywlyw Corel Photo-Paint VBA 2 04-04-2003 18:57
Speeding up a macro Rick Randall CorelDRAW/Corel DESIGNER VBA 2 12-12-2002 10:51


All times are GMT -5. The time now is 15:56.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com