Új hozzászólás Aktív témák

  • Zola007

    veterán

    válasz Fferi50 #41042 üzenetére

    Ha átírod nekem, az megköszönöm
    Ezt próbáltam, de nem az igazi

    I have experimented with loading a TextBox when you click a particular cell using the WorksheetSelectionChange event.

    In the VB Editor this is pasted into the 'Sheetx(Sheet x) of the sheet you are using it in.
    Currently the range is set to column A. If any cell in column A is clicked it loads a UserForm with only a TextBox in it with the content of the cell clicked on.

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    On Error Resume Next
    If Target.Cells.Count > 1 Then Exit Sub
    If Not Intersect(Target, Range("A1:A65000")) Is Nothing Then
    UserForm1.TextBox1.Value = Target.Value
    UserForm1.Show
    End If
    End Sub

    You will need to create a UserForm.
    Right-Click Forms > Insert > UserForm.
    If it's the only one it defaults to userForm1
    Add a TextBox to it.

    The TextBox Properties must be set to
    MultiLine = True
    Wordwrap= True

    You can also add scrollbars if there's a lot of text.

    You can change the Properties by right-clicking on the UserForm in the VBA window.

    [ Szerkesztve ]

    Mʏ ᴘʜɪʟᴏsᴏᴘʜʏ ɪs: Iᴛ’s ɴᴏɴᴇ ᴏғ ᴍʏ ʙᴜsɪɴᴇss ᴡʜᴀᴛ ᴘᴇᴏᴘʟᴇ sᴀʏ ᴏғ ᴍᴇ ᴀɴᴅ ᴛʜɪɴᴋ ᴏғ ᴍᴇ. I ᴀᴍ ᴡʜᴀᴛ I ᴀᴍ ᴀɴᴅ I ᴅᴏ ᴡʜᴀᴛ I ᴅᴏ. I ᴇxᴘᴇᴄᴛ ɴᴏᴛʜɪɴɢ ᴀɴᴅ ᴀᴄᴄᴇᴘᴛ ᴇᴠᴇʀʏᴛʜɪɴɢ. Aɴᴅ ɪᴛ ᴍᴀᴋᴇs ʟɪғᴇ sᴏ ᴍᴜᴄʜ ᴇᴀsɪᴇʀ. - Sɪʀ Aɴᴛʜᴏɴʏ Hᴏᴘᴋɪɴs

Új hozzászólás Aktív témák