Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-26-2013, 11:46 PM
ganeshm ganeshm is offline link excel to word Windows XP link excel to word Office 2007
Novice
link excel to word
 
Join Date: Mar 2013
Posts: 1
ganeshm is on a distinguished road
Default link excel to word

Hi Experts,



I have a formula from excel, which retrieves sheet 2 data to sheet 1 with the use of activex control (form control) button.

But i want to make a command button in word and link to excel to retrieve data.

Coding is below:

Code:
Sub LoadData()
Dim rng As Range
Sheets("Sheet1").Range("A4:A14").Clear
Set rng = Sheet2.Cells(1, 1).CurrentRegion
With rng
  .AutoFilter 4, Sheets("Sheet1").Buttons(Application.Caller).Caption
  .SpecialCells(12).Copy Sheets("Sheet1").Range("A4")
  .AutoFilter
End With
End Sub
Kindly verify this and suggest me.
Reply With Quote
  #2  
Old 03-27-2013, 01:29 AM
macropod's Avatar
macropod macropod is offline link excel to word Windows 7 64bit link excel to word Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

If you want to link a Word document to a particular Excel range, so that the document updates when the Excel workbook updates, copy the range, then paste it into Word, using Paste Special with the 'Paste Link' option and the paste format of your choice. No code required.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
link excel to word Excel Link in word chandan56 Office 3 07-02-2015 07:07 PM
link excel to word link conditional info in word based on excel list stijnvanhoof Mail Merge 1 11-13-2012 01:55 PM
link excel to word Help Plz! Link Excel data to Word document cory_0101 Office 1 09-27-2012 07:15 PM
Excel into word Equation editor with live link technopersia Excel 0 11-25-2011 09:05 AM
Is it possible to link an Excel File to a Word table? KIM SOLIS Excel 9 09-08-2011 07:05 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:19 PM.


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