Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Getting the source name of an OLE Object

When I insert an OLE object (Insert Object Create From File), the
caption below the actual icon is whatever filename I specified in the
Create From File textbox. Is there any way to get this source filename
by code? I remember seeing .SourceName somewhere, but it failed for
whatever reason. Does anyone have a specific example?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default Getting the source name of an OLE Object

From the Visual Basic Help file (Excel 2000)

SourceName Property


OLEObject, OLEObjects objects: Return or set the specified object's link
source name. Read/write String.

CubeField, PivotField, PivotItem objects: Return the specified object's
name, as it appears in the original source data for the specified PivotTable
report. This might be different from the current item name if the user
renamed the item after creating the PivotTable report. Read-only String.

The following table shows example values of the SourceName property and
related properties, given an OLAP data source with the unique name
"[Europe].[France].[Paris]" and a non-OLAP data source with the item name
"Paris".

Property Value (OLAP data source) Value (non-OLAP data source)
Caption Paris Paris
Name [Europe].[France].[Paris] (read-only) Paris
SourceName [Europe].[France].[Paris] (read-only) (same as SQL property
value, read-only)
Value [Europe].[France].[Paris] (read-only) Paris


When specifying an index into the PivotItems collection, you can use the
syntax shown in the following table.

Syntax (OLAP data source) Syntax (non-OLAP data source)
expression.PivotItems("[Europe].[France].[Paris]")
expression.PivotItems("Paris")


When using the Item property to reference a specific member of a collection,
you can use the text index names shown in the following table.

Name (OLAP data source) Name (non-OLAP data source)
[Europe].[France].[Paris] Paris



--
steveB

Remove "AYN" from email to respond
wrote in message
ups.com...
When I insert an OLE object (Insert Object Create From File), the
caption below the actual icon is whatever filename I specified in the
Create From File textbox. Is there any way to get this source filename
by code? I remember seeing .SourceName somewhere, but it failed for
whatever reason. Does anyone have a specific example?



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
Cannot start the source application for this object [email protected] Excel Worksheet Functions 0 October 26th 06 05:05 PM
CANNOT START THE SOURCE APPLICATION FOR THIS OBJECT WORD USER New Users to Excel 0 August 21st 06 04:55 PM
Cannot start the source application for this object oil_driller Excel Discussion (Misc queries) 1 March 3rd 05 03:41 PM
Cannot start the source application for this object Excel General Questions Excel Discussion (Misc queries) 0 February 2nd 05 07:05 PM
Source of value passed to class object Andrew[_16_] Excel Programming 0 September 2nd 04 01:33 AM


All times are GMT +1. The time now is 09:10 AM.

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"