Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-25-2018, 11:21 AM
klutch klutch is offline Pasting in word table, below bookmarks Windows 7 32bit Pasting in word table, below bookmarks Office 2016 for Mac
Advanced Beginner
Pasting in word table, below bookmarks
 
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
Reply

Tags
bookmark, if statement, vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
Pasting in word table, below bookmarks Pasting table data so that it will wrap around the table rebmaboss Word 1 11-25-2016 02:30 AM
Pasting text from Excel cell into word without creating a table, and keeping the in-cell formatting hanvyj Excel Programming 0 08-28-2015 01:15 AM
How to insert a table using bookmarks in a document Catty Word VBA 3 05-04-2015 03:05 AM
Pasting in word table, below bookmarks Table of Bookmarks Niy Word 3 03-28-2012 12:18 AM
Pasting table in Photoshop cutting off table azdolfan Word Tables 0 05-16-2010 01:52 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:39 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft