Closed Thread
Results 1 to 2 of 2

VBA-PROBLEM: DATEs AND HOURs SETTING

  1. #1
    Registered User
    Join Date
    04-01-2011
    Location
    Italy
    MS-Off Ver
    Excel 2003
    Posts
    4

    Post VBA-PROBLEM: DATEs AND HOURs SETTING

    Sometime I’m loading dates/hours from web sites and the loaded data are not correctly understood by Excel 2003 (my version) due to their separator setting (e.g. hours separator “:” rather than “.” and viceversa -> like 23:30:15 instead of 23.30.15).

    What I'm looking for is to fix a VBA SUB to modify the actual set of “International Options and Languages” of Office to another, in order to change the format of value, dates and hours before loading web data in the excel file where the macro is running.

    I have tested the following SUB without results:

    Sub International_option ()

    Shell "control.exe intl.cpl", 1 ‘activate International form
    SendKeys "{DOWN 8}", True ‘eight position down to move from English (GB) to Italian
    SendKeys "{TAB 3}", True
    SendKeys "{ENTER}", True ‘this instruction is not effective

    End Sub

    The above SUB is able to display the International Option and Languages form, to scroll the languages from English (GB) to Italian (IT), to select the OK button but …… unfortunately the final ENTER command is not effective (e.g. the hours are still separated by : as per English instead of . as per Italian language)

    Its seams that only a manual activation of OK button is effective, if the ENTER command (the last one in my example of SUB) is removed from the macro.

    Any help is highly appreciated.

    Thanks a lot

    Mimmo

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: VBA-PROBLEM: DATEs AND HOURs SETTING

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

Closed 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