View Single Post
 
Old 06-25-2018, 11:21 AM
klutch klutch is offline Windows 7 32bit Office 2016 for Mac
Advanced Beginner
 
Join Date: Jun 2018
Posts: 31
klutch is on a distinguished road
Default

OK, I have decided that pasting through bookmarks will not work for what I am trying to accomplish. I have found this code that allows the user to select the range they want to paste into mid-macro.
Code:
Sub GetUserRange()
    Dim UserRange As Range   
    Output = 565
    Prompt = "Select a cell for the output."
    Title = "Select a cell"
 
'   Display the Input Box
    On Error Resume Next
    Set UserRange = Application.InputBox( _
        Prompt:=Prompt, _
        Title:=Title, _
        Default:=ActiveCell.Address, _
        Type:=8) 'Range selection
 
'   Was the Input Box canceled?
    If UserRange Is Nothing Then
        MsgBox "Canceled."
    Else
        UserRange.Range("A1") = Output
    End If
End Sub
This also
Code:
  Dim userResponce As Range
On Error Resume Next
Set userResponce = Application.InputBox("select a range with the mouse", Default:=Selection.Address, Type:=8)
On Error GoTo 0
If userResponce Is Nothing Then
    MsgBox "Cancel clicked"
Else
    MsgBox "You selected " & userResponce.Address
This is for pasting into excel tables. Is there an identical way to select cells in a word table via the user selection?
Reply With Quote