View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
vishal vishal is offline
external usenet poster
 
Posts: 11
Default Excel event to determine if link has been added to the documen

Thanks a lot Tom. This was very helpful.

Best Regards,
Vishal

"Tom Ogilvy" wrote:

Linksources will give you all the links, so you can maintain a list and
identify if there was an addition or deletion.

I can't think of any other reason a formula would contain a '[' (if it
doesn't have a double quote) so

if Target.HasFormula and instr(1,target.formula,"[",vbTextcompare) and _
instr(1,target.formula,chr(34),vbTextcompare) = 0 then
' link here

--
Regards,
Tom Ogilvy


"Vishal" wrote:

Hi Tom,

Thats correct. I used the worksheet and workbook events to achieve the
same effect.

Also finding if the formula is a link involves parsing the formula (Can
be done using linksource)? Also if a link is deleted then how can I find that
link is deleted (What the previous value is and what the current value is)?

Best Regards,
Vishal

"Tom Ogilvy" wrote:

Not specifically. The change event would fire if a cell was edited and you
could check that cell to see if the formula was a link.

--
Regards,
Tom Ogilvy


"Vishal" wrote:

Hi All,

I am writing a plug-in for excel in Visual Basic. Is there a event that
says that a link has been added in the excel document that I can trap.

Thanks,
Vishal