Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Enable Trust Access to VBA Object Model through SendKeys Excel Spanish version

  1. #1
    New Member
    Join Date
    Jun 2017
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Enable Trust Access to VBA Object Model through SendKeys Excel Spanish version

    Hi,


    I am working on excel file that enabled VBA Object Model Through SendKeys for all English language users, SendKeys are not working for Users with Office Spanish version. I am hoping if anyone help in translating SendKeys to spanish version? I have placed my code snippets below.


    Code:
    Public Sub EnableTrustAccess()
    Dim i As Integer
    Dim strkeys As String
    On Error Resume Next
        Do While i <= 2 'try to sendkeys 3 times
        DoEvents
            Sleep 100
        DoEvents
            If Application.LanguageSettings.LanguageID(msoLanguageIDUI) = 1033 Then 'English Version
                strkeys = "%tms%v{ENTER}" 'Enable trust access to vba project object model
            Else 'Spanish Version
                strkeys = "????"     'enable trust access to vba project object model
            End If
            
            Call SendKeys(Trim(strkeys)) 
            DoEvents
            Sleep (100)
            i = i + 1
        Loop
    End Sub

  2. #2
    Board Regular alansidman's Avatar
    Join Date
    Feb 2007
    Location
    Steamboat Springs
    Posts
    3,805
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Enable Trust Access to VBA Object Model through SendKeys Excel Spanish version

    Alan Sidman
    Win 10--Office 2016

    Click below for a white paper on Data Base Design
    http://r937.com/relational.html



  3. #3
    MrExcel MVP
    Moderator
    Joe4's Avatar
    Join Date
    Aug 2002
    Posts
    39,989
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Enable Trust Access to VBA Object Model through SendKeys Excel Spanish version

    While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule #13 here along with the explanation: Forum Rules). This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
    TIPS FOR FINDING EXCEL SOLUTIONS
    1. Use the built-in Help that comes with Excel/Access
    2. Use the Search functionality on this board
    3. A lot of VBA code can be acquired by using the Macro Recorder.

    "Give a man a fish, feed him for a day. Teach a man to fish, feed him for life!"

  4. #4
    New Member
    Join Date
    Jun 2017
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Enable Trust Access to VBA Object Model through SendKeys Excel Spanish version

    I am marking this question as solved as I donot want to get any cross-posted response again, kudos to alan and joe.

  5. #5
    MrExcel MVP
    Moderator
    Joe4's Avatar
    Join Date
    Aug 2002
    Posts
    39,989
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Enable Trust Access to VBA Object Model through SendKeys Excel Spanish version

    I was just alerting you to our policy.

    If you are sure to mention any threads that you may Cross-Post in the future, and provide links to them, you won't get those kind of responses.

    Thanks
    TIPS FOR FINDING EXCEL SOLUTIONS
    1. Use the built-in Help that comes with Excel/Access
    2. Use the Search functionality on this board
    3. A lot of VBA code can be acquired by using the Macro Recorder.

    "Give a man a fish, feed him for a day. Teach a man to fish, feed him for life!"

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.
     


DMCA.com