View Single Post
 
Old 02-09-2021, 03:11 AM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,387
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

Well, if it's always the same Excel cell and same Word document - as your code implies - you don't need VBA at all. All you need to do is to set up an OLE link That's as simple as copying the Excel cell, switching to Word, selecting the destination and choosing Edit|Paste Special, with the 'paste link' option and choosing a suitable paste format. Done. From now on, the Word document will update to reflect any changes to the Excel cell.

PS: The error is because you're trying to use a named constant with late binding. You need to either:
• use early binding;
• define that constant; or
• substitute the name with its value.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote