Desctop Shortcut question

L

ludo.soete

Hi,

I use for the moment following code to place a shortcut on the desctop
and this works fine:

Sub DesctopShortcut()
Dim WShell As Object
Dim MyShortcut As Object
Dim DesktopPath As String
Dim fs As Object

Set WShell = CreateObject("wscript.shell")
DesktopPath = WShell.specialfolders("desktop")
Set MyShortcut = WShell.CreateShortCut(DesktopPath & "\" &
ActiveWorkbook.Name & ".lnk")

With MyShortcut
.targetpath = ActiveWorkbook.FullName
.iconlocation =
WShell.expandenvironmentstrings(ActiveWorkbook.Path & "\Belug
Shortcut.ico,0")
.Save
End With
Set WShell = Nothing
MsgBox " A Shortcut has been placed on your Desktop.", , "Place
Shortcut"
End Sub

But my question is now as follow:

Can i refer to an embedded commandbutton picture in a form from the
same program instead of an icon that resides in a folder?
If so, how to doe so?

Thanks in advance.
Ludo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top