![]() |
attach a file to a cell in a spreadsheet
how do i, or can i attach a file to a particular cell in a spreadsheet?
|
attach a file to a cell in a spreadsheet
You can't really attach a file to a particular cell, but you can put the
link icon in a particular cell, size the same as the cell, and set it to move and size with the cell. It will look as though it part of the cell, but it really isn't. Use code like the following: Dim OleObj As OLEObject With ActiveSheet.Range("C3") '<<< Change to appropriate cell Set OleObj = ActiveSheet.OLEObjects.Add(Filename:="C:\Susan.doc ", Link:=True, _ DisplayAsIcon:=True) OleObj.Top = .Top OleObj.Left = .Left OleObj.Width = .Width OleObj.Height = .Height OleObj.Placement = xlMoveAndSize End With There is, however, no way (directly) to determine from a cell whether there is a document associated with that cell. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (email address is on the web site) "chance" wrote in message ... how do i, or can i attach a file to a particular cell in a spreadsheet? |
All times are GMT +1. The time now is 04:11 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com