Hello Everyone,
I have used something liek the following to create 2 shortcuts that open a file:
My question is this: I would like Application.EnableEvents = True to run if the shortcut is clicked...can I do this?
Thank you
I have used something liek the following to create 2 shortcuts that open a file:
Rich (BB code):
<TABLE style="WIDTH: 48pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=64 x:str><COLGROUP><COL style="WIDTH: 48pt" width=64><TBODY><TR style="HEIGHT: 13.2pt" height=18><TD style="BORDER-BOTTOM: #ebe9ed; BORDER-LEFT: #ebe9ed; BACKGROUND-COLOR: transparent; WIDTH: 48pt; HEIGHT: 13.2pt; BORDER-TOP: #ebe9ed; BORDER-RIGHT: #ebe9ed" height=18 width=64>Public Sub Shortcut2()</TD></TR><TR style="HEIGHT: 13.2pt" height=18><TD style="BORDER-BOTTOM: #ebe9ed; BORDER-LEFT: #ebe9ed; BACKGROUND-COLOR: transparent; HEIGHT: 13.2pt; BORDER-TOP: #ebe9ed; BORDER-RIGHT: #ebe9ed" height=18>Dim WSHShell As Object</TD></TR><TR style="HEIGHT: 13.2pt" height=18><TD style="BORDER-BOTTOM: #ebe9ed; BORDER-LEFT: #ebe9ed; BACKGROUND-COLOR: transparent; HEIGHT: 13.2pt; BORDER-TOP: #ebe9ed; BORDER-RIGHT: #ebe9ed" height=18>Set WSHShell = CreateObject("WScript.Shell")</TD></TR><TR style="HEIGHT: 13.2pt" height=18><TD style="BORDER-BOTTOM: #ebe9ed; BORDER-LEFT: #ebe9ed; BACKGROUND-COLOR: transparent; HEIGHT: 13.2pt; BORDER-TOP: #ebe9ed; BORDER-RIGHT: #ebe9ed" height=18></TD></TR><TR style="HEIGHT: 13.2pt" height=18><TD style="BORDER-BOTTOM: #ebe9ed; BORDER-LEFT: #ebe9ed; BACKGROUND-COLOR: transparent; HEIGHT: 13.2pt; BORDER-TOP: #ebe9ed; BORDER-RIGHT: #ebe9ed" height=18>Dim DesktopPath As String</TD></TR><TR style="HEIGHT: 13.2pt" height=18><TD style="BORDER-BOTTOM: #ebe9ed; BORDER-LEFT: #ebe9ed; BACKGROUND-COLOR: transparent; HEIGHT: 13.2pt; BORDER-TOP: #ebe9ed; BORDER-RIGHT: #ebe9ed" height=18>DesktopPath = WSHShell.SpecialFolders("Desktop")</TD></TR><TR style="HEIGHT: 13.2pt" height=18><TD style="BORDER-BOTTOM: #ebe9ed; BORDER-LEFT: #ebe9ed; BACKGROUND-COLOR: transparent; HEIGHT: 13.2pt; BORDER-TOP: #ebe9ed; BORDER-RIGHT: #ebe9ed" height=18>CreateShortcut DesktopPath & "\Program.lnk", WSHShell.ExpandEnvironmentStrings(Range("B2").Value & "\Location\Program.xls"), WSHShell.ExpandEnvironmentStrings("%windir%"), (Range("B2").Value & "\Location\Shortcut.bmp")</TD></TR><TR style="HEIGHT: 13.2pt" height=18><TD style="BORDER-BOTTOM: #ebe9ed; BORDER-LEFT: #ebe9ed; BACKGROUND-COLOR: transparent; HEIGHT: 13.2pt; BORDER-TOP: #ebe9ed; BORDER-RIGHT: #ebe9ed" height=18>CreateShortcut Range("B2").Value & "\CLIPr\Canadian Life Income Planr.lnk", WSHShell.ExpandEnvironmentStrings(Range("B2").Value & "\Location\Program.xls"), WSHShell.ExpandEnvironmentStrings("%windir%"), (Range("B2").Value & "\Location\Shortcut.bmp")</TD></TR><TR style="HEIGHT: 13.2pt" height=18><TD style="BORDER-BOTTOM: #ebe9ed; BORDER-LEFT: #ebe9ed; BACKGROUND-COLOR: transparent; HEIGHT: 13.2pt; BORDER-TOP: #ebe9ed; BORDER-RIGHT: #ebe9ed" height=18>Set WSHShell = Nothing</TD></TR><TR style="HEIGHT: 13.2pt" height=18><TD style="BORDER-BOTTOM: #ebe9ed; BORDER-LEFT: #ebe9ed; BACKGROUND-COLOR: transparent; HEIGHT: 13.2pt; BORDER-TOP: #ebe9ed; BORDER-RIGHT: #ebe9ed" height=18></TD></TR><TR style="HEIGHT: 13.2pt" height=18><TD style="BORDER-BOTTOM: #ebe9ed; BORDER-LEFT: #ebe9ed; BACKGROUND-COLOR: transparent; HEIGHT: 13.2pt; BORDER-TOP: #ebe9ed; BORDER-RIGHT: #ebe9ed" height=18>End Sub</TD></TR></TBODY></TABLE>
Thank you