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 15-03-2011, 08:42
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default Savesettings error in other language versions

Hi.
I've recently had 2 users with the same problem. It seems savesettings is causing an error on their computer. I thought maybe it was a permissions problem until 2 users had the same problem. Does VBA save to the same directory no matter what the Windows/CorelDraw version?
Both users had showed me a screenshot and I did notice they use commas instead of periods for their language in the textboxes of the macro. Could this cause an issue?
Any other ideas?
Thanks.
-John
Reply With Quote
  #2  
Old 15-03-2011, 11:45
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 Commas

Yep, you have nailed it. Some languages will use a comma and not a period and things go wrong from there. You read in the value (a string), and convert to a double (CDbl) is see the comma and your get the error. If you are going to support International, you need to use (Val) first then (CDbl)

-Shelby
Reply With Quote
  #3  
Old 15-03-2011, 12:29
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

Hi.
This sub triggers the error handler in both cases.
Would that make this sub throw the error? Or is there also something else to blame?

Code:
Public Sub saveSettings()
    Dim fLeft As Double, fTop As Double
    
   On Error GoTo saveSettings_Error

    fLeft = frmMain.Left
    fTop = frmMain.Top
    
    
    
    SaveSetting "GDG_Nest", "Preferences", "form_left", fLeft
    SaveSetting "GDG_Nest", "Preferences", "form_top", fTop

    SaveSetting "GDG_Nest", "Preferences", "rand_use_h", frmMain.rdRandUseH.Value
    SaveSetting "GDG_Nest", "Preferences", "rand_use_w", frmMain.rdRandUseW.Value
    
    SaveSetting "GDG_Nest", "Preferences", "resp_area", frmMain.chkRespArea.Value
    SaveSetting "GDG_Nest", "Preferences", "leave_orig", frmMain.chkLeaveOrig.Value
    SaveSetting "GDG_Nest", "Preferences", "prec", frmMain.txtPrec
    SaveSetting "GDG_Nest", "Preferences", "ph", frmMain.txtH.Value
    SaveSetting "GDG_Nest", "Preferences", "margin", frmMain.txtMarg
    SaveSetting "GDG_Nest", "Preferences", "timer", frmMain.chkTimer.Value
    SaveSetting "GDG_Nest", "Preferences", "rotate45", frmMain.chkRot45.Value
    SaveSetting "GDG_Nest", "Preferences", "rotate", frmMain.chkRot.Value
    SaveSetting "GDG_Nest", "Preferences", "unit", frmMain.ComboBoxUnits.Value
    SaveSetting "GDG_Nest", "Preferences", "rotate", frmMain.chkRot.Value
    SaveSetting "GDG_Nest", "Preferences", "pw", frmMain.txtW.Value
    SaveSetting "GDG_Nest", "Preferences", "opt", frmMain.chkOpt.Value
    
    
    SaveSetting "GDG_Nest", "Preferences", "mode1", frmMain.rdModeNew.Value
    SaveSetting "GDG_Nest", "Preferences", "mode2", frmMain.rdModeAdd.Value
    SaveSetting "GDG_Nest", "Preferences", "mode3", frmMain.rdModeQuickTile.Value
    
    SaveSetting "GDG_Nest", "Preferences", "rand_mx", frmMain.txtRandMx.Value
    SaveSetting "GDG_Nest", "Preferences", "rand_my", frmMain.txtRandMy.Value
    SaveSetting "GDG_Nest", "Preferences", "rand_pal", frmMain.cbRandPal.Value

   On Error GoTo 0
   Exit Sub

saveSettings_Error:

    MsgBox "Error"
-John
Reply With Quote
Reply

Tags
comma, savesettings


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
X5 versions eastcoastcreative Site News 3 25-11-2010 22:08
X5 Versions shelbym Site News 0 25-11-2010 22:03
How to use a CQL on C# (4GL Language) ljesus7 CorelDRAW/Corel DESIGNER VBA 2 26-08-2010 06:09
getting my plugin working with all versions questionaire CorelDRAW/Corel DESIGNER VBA 6 28-08-2008 10:17
SP1/SP2 or SaveSettings and future patches... mecanomaniaco CorelDRAW/Corel DESIGNER VBA 6 14-04-2005 09:50


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


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