Results 1 to 5 of 5

Change User 32 to User 64

Threaded View

  1. #1
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,015

    Change User 32 to User 64

    .
    I've looked online for a resource that would help edit the below to work on a 64 bit system. My mind isn't grasping what is probably very obvious ...

    Can someone suggest a good resource I could easily understand or provide direct assistance here ?

    Thank you.




    Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal _
       bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
    Private Const KEYEVENTF_KEYUP = &H2
    Private Const VK_SNAPSHOT = &H2C
    Private Const VK_MENU = &H12 '''
    
    Private Sub AltPrintScreen()
            keybd_event VK_MENU, 0, 0, 0
            keybd_event VK_SNAPSHOT, 0, 0, 0
            keybd_event VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0
            keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0
    End Sub
    Private Sub CommandButton2_Click()
    Call AltPrintScreen
        DoEvents
        Application.Wait Now + TimeSerial(0, 0, 1)
        Worksheets("Print Userform").Range("B3").PasteSpecial
        Unload Me
    End Sub
    
    Private Function WordCount(countme As String) As Integer
    Dim words() As String
        countme = Replace(countme, " ", " ")
        words() = Split(countme, " ")
        WordCount = UBound(words) + 1
    End Function
    
    Private Sub TextBox19_Change()
        Label23.Caption = WordCount(TextBox19.Text)
        If WordCount(TextBox19.Text) >= 25 Then
            MsgBox "25 word limit has been reached.", vbOKOnly, "Max Message Length"
        End If
    End Sub
    
    Private Sub UserForm_Initialize()
        With UserForm1.ComboBox1
        .AddItem "EMERGENCY"
        .AddItem "Priority P"
        .AddItem "Welfare W"
        .AddItem "Routine R"
        End With
        
        With UserForm1.ComboBox2
        .AddItem "HXA  &  #"
        .AddItem "HXB  &  #"
        .AddItem "HXC"
        .AddItem "HXD"
        .AddItem "HXE"
        .AddItem "HXF  &  #"
        .AddItem "HXG"
        End With
    End Sub
    
    Private Sub ComboBox2_AfterUpdate()
     
     Select Case ComboBox2
      Case "HXA  &  #"
       TextBox22.Text = "Collect landline delivery authorized by addressee within...miles. (If no number, authorization is unlimited.)"
      Case "HXB  &  #"
       TextBox22.Text = "Cancel message if not delivered within _ hours of filing time; service originating station."
      Case "HXC"
        TextBox22.Text = "Report date and time of delivery (TOD) to originating station."
      Case "HXD"
       TextBox22.Text = "Report to originating station the Identity of station from which received, plus date and time. Report Identity of station to which relayed, plus date and time, or if delivered report date, time and method of delivery."
      Case "HXE"
       TextBox22.Text = "Delivering station get reply from addressee, originate message back."
      Case "HXF  &  #"
        TextBox22.Text = "Hold delivery until...(date)."
      Case "HXG"
        TextBox22.Text = "Delivery by mail or landline toll call not required. If toll or other expense involved, cancel message and service originating station. Most Routine messages are HXG."
      End Select
     
    End Sub
    In 32 bit the macro copies a UserForm showing on screen then pastes that image to the worksheet. It does not take a complete screen image.
    Last edited by Logit; 03-03-2019 at 11:59 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Change event to Convert (calculate) user input if user types % sign
    By soundneedle in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-18-2016, 12:01 PM
  2. Replies: 1
    Last Post: 05-27-2015, 01:31 PM
  3. change event macro to evaluate windows user who initiated the change then send email
    By pmanoloff in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-23-2012, 03:31 PM
  4. Replies: 15
    Last Post: 04-17-2012, 08:19 AM
  5. Insert user's name into cell based on windows user login when a button is clicked.
    By jonvanwyk in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 08-16-2011, 01:08 PM
  6. Pause macro for user input then search for user's answer across multiple sheets
    By sassy2 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-04-2009, 03:55 AM
  7. How to change the desktop name from being user specific to general user?
    By punter in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-25-2007, 04:06 PM

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