OberonPlace.com Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 16-05-2004, 16:58
Anonymous
Guest
 
Posts: n/a
Default vba starting with vb exe program

this is a interesting that i wrote the two different code for two versions of CDraw (11-12)

first for 11

'for 11
Private Sub Command1_Click()
'MsgBox "Tuncowsky'e Teşekkür Ediniz!) VbOk"
Unload Me
'Dim corelDRAW As Application
Dim kontakunltd As String
Dim Converter As String
Dim cDraw As Object
Dim gms As corelDRAW.GMSManager
If corelDRAW.Visible = True Then
Set cDraw = CreateDocument
corelDRAW.InitializeVBA
corelDRAW.Visible = True
Set gms = corelDRAW.GMSManager
GMSManager.RunMacro "kontakunltd", "Converter.start"
Else
Dim Retval
Retval = Shell("C:\Program Files\Corel\Corel Graphics 11\Programs\Coreldrw.exe", 0)
'Set cDraw = CreateObject("CorelDraw.Application")
Set cDraw = CreateDocument
corelDRAW.InitializeVBA
corelDRAW.Visible = True
Set gms = corelDRAW.GMSManager
GMSManager.RunMacro "kontakunltd", "Converter.start"
End If
End Sub

for 12:

'for 12
Private Sub Command1_Click()
MsgBox "Tuncowsky'e Teşekkür Ediniz!) VbOk"
Unload Me
Dim kontakunltd As String
Dim Converter As String
Dim cDraw As Object
Dim gms As corelDraw.GMSManager
If corelDraw.Visible = True Then
Set cDraw = CreateDocument
corelDraw.InitializeVBA
corelDraw.Visible = True
Set gms = corelDraw.GMSManager
GMSManager.RunMacro "kontakunltd", "Converter.start"
Else
Set cDraw = CreateObject("CorelDraw.Application")
cDraw.CreateDocument
cDraw.InitializeVBA
cDraw.Visible = True
Set gms = corelDraw.GMSManager
GMSManager.RunMacro "kontakunltd", "Converter.start"

End If
End Sub

little bit differences in the codes, but it works good.
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
delete vba project from cdr file hotairballoon CorelDRAW/Corel DESIGNER VBA 1 18-05-2005 09:08
CD 10, VBA not returning true outline width Webster CorelDRAW/Corel DESIGNER VBA 1 24-11-2004 17:09
VC++ and VBA chinkyk CorelDRAW/Corel DESIGNER VBA 1 15-11-2004 12:24
vba question bumblebee CorelDRAW/Corel DESIGNER VBA 4 04-08-2004 15:07
Detect if VBA is installed (an answer and a question) reanan CorelDRAW/Corel DESIGNER VBA 3 04-12-2002 14:35


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


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