OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > Code Critique

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-06-2012, 22:48
gorgo gorgo is offline
Senior Member
 
Join Date: Feb 2010
Posts: 169
Default macro causing annoying warning box

If this code is in the 'ThisMacroStorage' section of a macro I use called scale.gms, it causes an annoying warning message box to pop up everytime I open a document. Here is the code.



Private Sub GlobalMacroStorage_DocumentOpen(ByVal Doc As Document, ByVal FileName As String)
ScaleApps.ScaleCaption
ActiveDocument.LoadStyleSheet "C:\BlankTemplate.CDT"
End Sub



The code in question is the LoadStyleSheet which is causing the problem. Would anyone have a solution please?

The warning box reads: "Do you want to revert to the saved........cdr?"
Reply With Quote
  #2  
Old 07-06-2012, 01: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 Dialog

Mmmmm, I don't see the message. What version of CorelDRAW are you using, may I have your .CDT file.

-Shelby
Reply With Quote
  #3  
Old 21-03-2013, 09:26
SteveDude SteveDude is offline
Senior Member
 
Join Date: Dec 2005
Location: Salina, Kansas USA
Posts: 149
Default

Quote:
Originally Posted by gorgo View Post
"C:\BlankTemplate.CDT"
You should never work with files in C drives root. It's best to use a temp folder, the documents folder or the User Data folder. This will cause you some grief in Win8 and probably Win7 as well. It also does not meet MS standards for File IO.
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
Empty Text boxes causing Runtime 91 Object Variable not set PaulANormanNZ CorelDRAW/Corel DESIGNER VBA 2 21-08-2009 02:15
Disabling warning programatically vjCorel CorelDRAW/Corel DESIGNER VBA 2 23-04-2009 13:53
X4 SaveAs Causing Crash burmeisn CorelDRAW/Corel DESIGNER VBA 2 15-08-2008 18:22


All times are GMT -5. The time now is 05:03.


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