About 473,000 results
Open links in new tab
  1. excel - Get text from clipboard using GetText - Stack Overflow

    I'm using code like this to get text from off the Clipboard. Dim DataObj As New MSForms.DataObject DataObj.GetFromClipboard myString = DataObj.GetText I use error ...

  2. Userform Listbox (multi-column/multi-select) drag and drop ...

    Oct 13, 2014 · I have been tinkering with some code to drag and drop one or more selected items from one listbox (multi-column) to a second list box. When the drop is complete the items selected in the …

  3. vba - Difference between declaring a userform as Object vs MSForms ...

    Dim oForm As MSForms.UserForm Dim oForm1 As Object So what happens when you initialize the objects is oForm gets initialized as a UserForm, while the runtime determines that the Object oForm1 …

  4. VBA Syntax - Last key press in userform - Microsoft Community

    Nov 1, 2016 · Hi Silly syntax question Context: I have a userform with a macro that is activated when any key is pressed Private Sub CommandButton1_KeyDown(ByVal KeyCode As …

  5. Double Click Event on the items of the ListBox of a Userform VBA

    Private Sub Listbox1_BeforeDoubleClick(ByVal Cancel As MSForms.ReturnBoolean) With Me.ListBox1 For i = 0 To .ListCount - 1 If .Selected(i) Then Me.TextBox1.Value = .List(i, 0) Exit For End If Next …

  6. Enabling a commandButton if any of the OptionButton on a Userform …

    Nov 3, 2010 · That is why I am looking for a catch-All kind of code, that would take this into account. Add a class module to your project, name it "MyOptionButton" and add this code: --- schnipp --- Option …

  7. Excel VBA - Calling TextBox Exit Event on Userform manually?

    My last option I've considered is having the AfterUpdate event just call the Exit event, however the Exit event has a required argument (ByVal Cancel As MSForms.ReturnBoolean), which is how you …

  8. Programmatically adding a commandbutton to a userform

    Private WithEvents mobjBtn As MSForms.CommandButton Private msOnAction As String ''// This has to be generic or call by name won't be able to find the methods ''// in your form. Private mobjParent As …

  9. Excel VBA code to copy a specific string to clipboard

    I'm trying to add a button to a spreadsheet that when clicked will copy a specific URL to my clipboard. I had a bit of knowledge of Excel VBA but it's been a while and I'm struggling.

  10. How to assign keydown events to a userform? - Stack Overflow

    Sub UserForm_KeyDown(ByVal KeyAscii As MSForms.ReturnInteger, ByVal Shift As Integer) Select Case KeyAscii Case 13 'enter key addBtn_Click Case 39 'right arrow skipBtn_Click Case 27 'escape …