+ Reply to Thread
Results 1 to 14 of 14

Regional settings, can they be over-ridden within a project

  1. #1
    Registered User
    Join Date
    03-25-2009
    Location
    San Jose
    MS-Off Ver
    Excel 2007
    Posts
    83

    Regional settings, can they be over-ridden within a project

    I'm attempting to develop an application that will get world-wide usage, but my first tester is in the UK (Danish) and the app Kacked on a simple time format command.

    Since this is intended as a self contained project, is it possible to establish those settings as part of my project?
    Last edited by D3Pratt; 04-08-2009 at 10:16 PM.

  2. #2
    Registered User
    Join Date
    03-25-2009
    Location
    San Jose
    MS-Off Ver
    Excel 2007
    Posts
    83

    Re: Regional settings, can they be over-ridden within a project

    Here's the point where it dies, well it doesn't die, but it doesn't format either.

    Please Login or Register  to view this content.
    is there a way to do this that is "region free"?

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Regional settings, can they be over-ridden within a project

    See the FormatDateTime function.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    03-25-2009
    Location
    San Jose
    MS-Off Ver
    Excel 2007
    Posts
    83

    Re: Regional settings, can they be over-ridden within a project

    Wow this hurts.

    From this

    Please Login or Register  to view this content.
    To this
    Please Login or Register  to view this content.
    and I can't get it to work

  5. #5
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: Regional settings, can they be over-ridden within a project

    What isn't working?

    Are 'MissionBegin', 'MissionEnd' and 'TotalTimeDisplay' textboxes on a userform? Or variables declared elsewhere in code?

  6. #6
    Valued Forum Contributor ffffloyd's Avatar
    Join Date
    05-20-2008
    Location
    Perth, WA, Australia
    MS-Off Ver
    Office 365
    Posts
    249

    Re: Regional settings, can they be over-ridden within a project

    I don't know if it is significant or intentional but in the first bit of code you were assigning to MissionBegin.Text and in the second you are assigning to MissionBegin.Value.

  7. #7
    Registered User
    Join Date
    03-25-2009
    Location
    San Jose
    MS-Off Ver
    Excel 2007
    Posts
    83

    Re: Regional settings, can they be over-ridden within a project

    They are on a UserForm

    My problem was that this didn't work
    Please Login or Register  to view this content.
    not sure what made me try this:

    Please Login or Register  to view this content.
    But now it works... I have to add in a check to kick out null readings or it crashes tho

    Please Login or Register  to view this content.
    Thanks to both of you for your help, I'm afraid this nightmare is just starting.

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Regional settings, can they be over-ridden within a project

    Please Login or Register  to view this content.
    What doesn't work?

  9. #9
    Registered User
    Join Date
    03-25-2009
    Location
    San Jose
    MS-Off Ver
    Excel 2007
    Posts
    83

    Re: Regional settings, can they be over-ridden within a project

    Quote Originally Posted by ffffloyd View Post
    I don't know if it is significant or intentional but in the first bit of code you were assigning to MissionBegin.Text and in the second you are assigning to MissionBegin.Value.
    LOL I've been grasping at straws for a few hours on this one.. finally got it tho.

    Dern picky beta testers actually expect the thing to work...

  10. #10
    Registered User
    Join Date
    03-25-2009
    Location
    San Jose
    MS-Off Ver
    Excel 2007
    Posts
    83

    Re: Regional settings, can they be over-ridden within a project

    @shg

    I honestly had no clue.

    I'm sure you've heard the theory about 10,000 chimpanzees and 10,000 typewriters...

    well, that's me when I'm coding...


    Bang on the keyboard till the screen fills up then hit compile...

    ...eventually it'll work. Right?

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Regional settings, can they be over-ridden within a project

    All's well that ends well.

  12. #12
    Registered User
    Join Date
    03-25-2009
    Location
    San Jose
    MS-Off Ver
    Excel 2007
    Posts
    83

    Re: Regional settings, can they be over-ridden within a project

    well... as it turned out. It works on my machine, but still Kacks on the first regional setting I tried....

    Please Login or Register  to view this content.
    When set to Danish, instead of a formatted time, I get the core number and the Runtime Error '6' "Overflow" at the format line

  13. #13
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Regional settings, can they be over-ridden within a project

    Is MissionBegin.Value a valid time given regional settings? How about doing an explicit type conversion first, and a little debugging.

  14. #14
    Registered User
    Join Date
    03-25-2009
    Location
    San Jose
    MS-Off Ver
    Excel 2007
    Posts
    83

    Re: Regional settings, can they be over-ridden within a project

    MissionBegin is a TextBox pulling data from a cell on the worksheet that was set by a button... nm here is the code.

    Please Login or Register  to view this content.
    and a combination of lack of sleep and Noob leaves me unable to answer your question better than that.

    I'll remedy the first part now, and maybe I'll understand better tomorrow.

    Thank you yet again for your help

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1