.
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.
Bookmarks