Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default Display only file name in embedded icon

Sorry, am living up to being a blonde today! ;-)

Sub InsertFile()


Dim vFile As Variant
vFile = Application.GetOpenFilename("All Files,*.*", Title:=" Find file to
insert")
If LCase(vFile) = "false" Then Exit Sub
ActiveSheet.OLEObjects.Add Filename:=vFile, Link:=True, DisplayAsIcon:=True,
IconFileName:= _
"C:\WINDOWS\Installer\{90110409-6000-11D3-8CFE-0150048383C9}\xlicons.exe", _
IconIndex:=0, IconLabel:=vFile
End Sub

"Rick Rothstein" wrote:

I don't see the code you referred to.

--
Rick (MVP - Excel)


"Joyce" wrote in message
...
Hello,

I'm using the code below with a command button to allow users to easily
insert files as icons into an Excel file.

I'd ideally like only the name of the file (as opposed to the entire path)
to be displayed. Is this possible?

Thanks!



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
Change label of an embedded-object icon hmm Excel Discussion (Misc queries) 3 April 4th 23 11:34 AM
Icon Sets - Display icon in one cell depending upon value in anoth Nolene Excel Worksheet Functions 2 February 26th 10 05:43 AM
Embedded OleObject displayed as icon eedev Excel Programming 4 February 24th 10 11:48 AM
can't display link as icon sgawler Excel Worksheet Functions 0 April 11th 08 04:56 PM
Change Display Icon ben Excel Programming 1 February 14th 06 05:06 AM


All times are GMT +1. The time now is 10:49 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"