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

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
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,218,620
Messages
6,143,523
Members
450,492
Latest member
Rusbus1972

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