Is this a macro?

Dysprositos

Board Regular
Joined
Aug 3, 2002
Messages
92
HI, id like to put and icon on my desktop which, when clicked, opens several different webpages and applications simultaneously.

I know i can create a shortcut to a single webpage. How do i open more?

Thanks.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
OK so that was pretty simple.

I added a macro to a button.
It opens every link i associate with it.

But id like the button to be on the desktop.

how can i move it there?

can i do this with vba?
 
Upvote 0
Dysprositos,

Following procedure create a shortcut on the desktop:

<pre>
Option Explicit

Sub Create_Shortcut_Workbook()
Dim WSS As Object
Dim oGenvag As Object
Dim stSkrivbordsSokvag As String

Set WSS = CreateObject("WScript.Shell")
stSkrivbordsSokvag = WSS.SpecialFolders("Desktop")
Set oGenvag = WSS.CreateShortcut(stSkrivbordsSokvag & _
"" & ThisWorkbook.Name & ".lnk")

With oGenvag
.TargetPath = ThisWorkbook.FullName
Debug.Print ThisWorkbook.Path
.IconLocation = ThisWorkbook.Path & "Staroffice.ico"
.Save
End With

Set WSS = Nothing
End Sub
</pre>

Note: You need to se a reference to "Windows Host Script Model" via Tools | Reference in the VB-editor.

Kind regards,
Dennis
 
Upvote 0

Forum statistics

Threads
1,214,954
Messages
6,122,461
Members
449,085
Latest member
ExcelError

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top