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

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Dysprositos

Board Regular
Joined
Aug 3, 2002
Messages
92
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?
 

XL-Dennis

Well-known Member
Joined
Jul 27, 2002
Messages
1,920
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
 

Forum statistics

Threads
1,143,615
Messages
5,719,728
Members
422,242
Latest member
hishamkhatri

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
Top