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 11-04-2012, 08:11
L_G_D L_G_D is offline
Member
 
Join Date: Apr 2009
Posts: 31
Default Windows update and compile error

Windows 7 just updated yesterday, and I think one of the security updates broke something in VBA. This happened on two systems configured similarly. In the recent files macro (of course, what else?) as soon as I try to run it, it pops up the error

"Object library invalid or contains references to object definitions that could not be found"

Then it selects this bit of code:

Code:
Option Explicit
I have no idea what this bit of code does. If I comment it out, I don't get the error, but it doesn't run either. I'm currently not using Draw X6 because recent files doesn't work in it, and I've come to depend greatly on recent files.
Reply With Quote
  #2  
Old 11-04-2012, 11:06
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Reference

It means that you are missing a reference, take a look here:

If you see this error....

Also, you can check the references to see which one is missing by opening the VBA editor on the menu go to Tools | References. Is should list the reference you are missing as missing. :-)

-Shelby
Reply With Quote
  #3  
Old 11-04-2012, 16:05
L_G_D L_G_D is offline
Member
 
Join Date: Apr 2009
Posts: 31
Default

Ahhh..... thanks. Had to fiddle a bit then I remembered to run it as administrator (the .bat that comes with the files) one of the regsvr commands failed, but the other one worked and that seems to have fixed it.

Thanks again. Now if it was only so simple to get it working in Draw X6, I get the same error but for this code:

Code:
Function ActiveCtl() As Control
And it selects the same reference, Microsoft Forms 2.0 Object Library, so something in that must have changed I guess.

Last edited by L_G_D; 11-04-2012 at 16:10.
Reply With Quote
  #4  
Old 13-04-2012, 09:07
Dave Rowland
Guest
 
Posts: n/a
Default

I appear to have mixed machines reporting the same failure... windows update is all i can think of too...

according to my windows installer log... office 2007, .net and visual C++ libraries have been updated

UPDATE:-

After researching, it appears windows update did install something, you have to delete MSComctlLib.exd from the following location and it all goes back to normal.

C:\Documents and Settings\username\Application Data\Microsoft\forms

Last edited by Dave Rowland; 13-04-2012 at 10:14.
Reply With Quote
  #5  
Old 13-04-2012, 15:29
L_G_D L_G_D is offline
Member
 
Join Date: Apr 2009
Posts: 31
Default

Interesting, if I get rid of the file mentioned, now it gives me a type mismatch error on this line:

Code:
cc.lpCustColors = VarPtr(customColors(0))
With VarPtr highlighted, which, apparently, according to google is a 32 bit memory access function, so it's probably been replaced by a 64 bit function? Stabbing in the dark there, since I have no idea.

sigh......

Last edited by L_G_D; 13-04-2012 at 15:48.
Reply With Quote
  #6  
Old 15-04-2012, 00:53
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default VarPtr

VarPtr will return a LongPtr on 64-bit systems and a Long on 32-bit systems.

-Shelby
Reply With Quote
  #7  
Old 15-04-2012, 08:49
L_G_D L_G_D is offline
Member
 
Join Date: Apr 2009
Posts: 31
Default

OK, guessing here, does that mean I have to try changing all longs to longptr?

As in: Dim x as long
to
Dim x as longptr?

If not, then I have no idea what you're talking about, way beyond my skills.
Reply With Quote
  #8  
Old 16-04-2012, 17:09
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Long

Not all Long DataTypes need changed to LongPtr, only those API Functions that now return LongPtr, and of course in this case your VarPtr. If you want me to look at your code and help make changes send me a private message and I will help out.

-Shelby
Reply With Quote
  #9  
Old 18-04-2012, 12:08
L_G_D L_G_D is offline
Member
 
Join Date: Apr 2009
Posts: 31
Default

This is for the Recent Files macro I already sent you, still hoping to get it working.
Reply With Quote
  #10  
Old 19-04-2012, 13:14
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Recent Files

Recent Files is going to take some work to get working under X6, I have it on my list, but trying to get some of the other Macros knocked out first.

-Shelby
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
Error: Can not compile beczukdavid General 0 14-01-2011 04:58
Compile error in hidden module:clsFont cavancura@speakeasy.net Jigsaw Puzzle Creator 0 17-08-2008 02:43
GMS-Installer (update) Seelenquell CorelDRAW/Corel DESIGNER VBA 5 19-04-2004 15:49
Export filter compile error ddonnahoe CorelDRAW/Corel DESIGNER VBA 1 26-01-2004 10:15
Pls. do not laugh... about compile command... CorelUser CorelDRAW/Corel DESIGNER VBA 3 17-07-2003 23:49


All times are GMT -5. The time now is 19:58.


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