Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default 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?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default 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?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using an offset formula for the reference in a relative reference Cuda Excel Worksheet Functions 6 November 15th 06 06:12 PM
Saving worksheet in new file with date AND cell value as file name michaelberrier Excel Discussion (Misc queries) 4 May 26th 06 08:05 PM
Need to insert file modified date of Excel spreadsheet in a cell dj in Mass. Excel Discussion (Misc queries) 0 March 23rd 06 10:41 PM
Reference a cell on another worksheet in the same spreadsheet file Dave Excel Discussion (Misc queries) 3 May 17th 05 08:55 PM
Using Jet to read excel file returns blank for last cell - sometim Ron Excel Discussion (Misc queries) 1 December 9th 04 09:21 AM


All times are GMT +1. The time now is 08:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"