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 12-05-2010, 00:49
knowbodynow knowbodynow is offline
Senior Member
 
Join Date: Mar 2006
Location: Hatsukaichi near Hiroshima
Posts: 431
Default X5 Error using Vba replace

I'm getting a 450 error when trying to use vba replace eg replace("corelDraw","Draw", ""). Has anyone else experienced a problem with X5 and regular Vba replace?

Thanks,

Chris
Reply With Quote
  #2  
Old 12-05-2010, 01:32
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,770
Blog Entries: 10
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 450 Error

I have not seen this. I believe Error 450 is normally wrong number of arguments. If you have a specific example that is not working, I would be happy to try it for you.

-Shelby
Reply With Quote
  #3  
Old 12-05-2010, 08:56
knowbodynow knowbodynow is offline
Senior Member
 
Join Date: Mar 2006
Location: Hatsukaichi near Hiroshima
Posts: 431
Default

Thanks, Shelby. Here's part of a macro I use with CD12. Each page of the document has a layer named text with a single item of artistic text on the layer. I can't work out why I should be getting an error with X5.

Chris

Code:
 Sub pagerenamer()
 
 Dim p As Page
 Dim s As Shape
 Dim lr As Layer

    ActivePage.Layers("text").Activate

    For Each p In ActiveDocument.Pages
         For Each s In p.ActiveLayer.FindShapes(Type:=cdrTextShape)
             p.Name = s.Text.Story
             p.Name = Replace(p.Name, vbCr, "")    
         Next s
    Next p

Exit sub
Reply With Quote
  #4  
Old 12-05-2010, 10:36
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

Hi.
I didn't get any error besides no "end sub".
Can you post a test file that your getting the error with.

-John
Reply With Quote
  #5  
Old 12-05-2010, 12:44
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,770
Blog Entries: 10
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 PageRenamer

Seems to work fine here also. No errors, unless I start on a page without a "text" layer.

-Shelby
Reply With Quote
  #6  
Old 12-05-2010, 16:22
knowbodynow knowbodynow is offline
Senior Member
 
Join Date: Mar 2006
Location: Hatsukaichi near Hiroshima
Posts: 431
Default

Thanks, John, Shelby. Sorry, I was careless with my cutting and pasting. It fails with every document - it won't pass debugging with any line including the replace code, but I know that code is fine. It's as if vba is broken in X5. I'm not getting an error with CD12.

Chris
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
Replace object admold CorelDRAW/Corel DESIGNER VBA 3 20-09-2008 15:31
Replace color admold CorelDRAW/Corel DESIGNER VBA 4 18-08-2008 18:04
Problems with replace knowbodynow CorelDRAW/Corel DESIGNER VBA 3 23-05-2008 19:19
Actual Replace vindaa CorelDRAW/Corel DESIGNER VBA 11 22-05-2008 20:20
Help with Replace Macro Pumpkin_Masher Macros/Add-ons 1 21-09-2005 14:41


All times are GMT -5. The time now is 23:10.


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