Launch Shortcut Through VBA

Feb 22, 2008

Is it possible to launch a program through desktop shortcut with VBA? I have the following code and it is giving me an 'Invalid procedure call or argument' error
Edit: Typing the string into the Run command works fine.

Dim objWsh As Object, _
strDesktop As String

Set objWsh = CreateObject("WScript.Shell")
strDesktop = objWsh.SpecialFolders("Desktop") & "Wildfire 3.0.lnk"

Set objWsh = Nothing

Shell strDesktop, vbMaximizedFocus

View 9 Replies


ADVERTISEMENT

Launch A Desktop Shortcut

Apr 6, 2008

I have a lot of shortcuts to movies for my 5th grade students which won't work. I can launch direct file names but not shortcuts from within excel I can click on a cell to launch a direct file like this = "C:Program FilesOfficexpOffice10winword.exe" /n "c:mode.doc" but if C:modeSC.doc" is a desktop shortcut then it opens winword but not the document.

I get " document name or path is not valid" from within winword. But if I go to drive C and click on the shortcut, it opens winword and the ModeSC.doc which is a 1 KB shortcut.

View 9 Replies View Related

Launch A Website

Jan 14, 2010

I am wanting to be able to lauch www.fafsa.gov from within Excel. In other words I want to be able to put a button on screen and when the user clicks on the button it will record some statistical data and then lauch the website. I know how to do everything except lauch the website. Can you lauch a website using code from within Excel.

View 4 Replies View Related

Launch Notepad Using VB Code

Dec 6, 2006

I looking for the VBcode of how to:

1) Launch the Windows Notepad using an Excel VB button
2) Copy the Excel sheet data (valiable range) into the Notepad
3) Get the Notepad "Save As" dialog window to save the Text file

View 9 Replies View Related

Launch A Userform During Startup

Nov 13, 2006

I am trying to launch the userforms with the below codes during startup(that is when you click the excel file, the userform will automatically pop up).
Please, Can somebody guide me through ?
Compare_Map is a subroutine which is to be called when optionbutton3 is being selected.

Private Sub OptionButton1_Click()

End Sub

Private Sub OptionButton2_Click()

End Sub

Private Sub OptionButton3_Click()
Call Compare_Map
Exit Sub
End Sub

View 3 Replies View Related

How To Launch At A Specified Time Without Someone Pressing A Button

Nov 30, 2007

Is it possible to launch Excel at a specified time without someone pressing a button?

I'm working on a network which has disabled Scheduled Tasks. The purpose of this request is to launch Excel in the early hours of the day so that a macro would run and update the data from a data source. The macro works brilliantly, but I without anyone in the office at 2am to open Excel, I need to find a way to launch it automatically.

Also, I don't have permissions to install programs or add-ins from the Internet. It doesn't leave me with many options, but I'm just wondering if there's a trick that has so far eluded me.

View 11 Replies View Related

Launch Email With A Dropdown List

Oct 30, 2007

Is it possible to Launch individual Email addresses for names in a dropdown List?

View 14 Replies View Related

Excel VBA To Launch Notepad And Save

Oct 14, 2011

I want to know if it is possible to launch a blank notepad from an existing excel spreadsheet and then type relevant "history notes" into notepad and save.

I am creating a manual spreadsheet for the company I am working for which is being used for Maintenance Planning / Scheduling and creating of work orders. Once the work order has been raised and the job has been completed it then needs to be closed out on the spreadsheet and any relevant notes entered in. I am hoping to be able to have a link that opens notepad by the click of a button within the spreadsheet and it allows the user to record any notes against that work order and save. These notes can then viewed by future users.

View 5 Replies View Related

Launch Form From Custom Toolbar?

Oct 3, 2012

I have a custom toolbar with a button on it that I want to open a userform from.

I have tried this macro

VB:

Code:
Sub Admin_Show()
frmAdmin.Show
End Sub

[Code]....

View 3 Replies View Related

Launch Vncviewer, And Point It To An IP Address

Dec 11, 2007

I'm trying to resolve, and all my clues are leading me to the impression that using VBA is the only way to accomplish my task.

I am trying to integrate the ability to launch a program with command line arguments by clicking on a cell. More specifically, I'm trying to launch vncviewer, and point it to an IP address.

the command line would look like:

c:program filesultravncvncviewer.exe 192.168.XXX.XXX

The only text the cells will have in them is the IP address to the machine with which I would like to initiate a connection, and I'm hoping theres a way to automatically pull that information from the cell and run it in the command. Is there a way to do this? Better yet, is there a relatively simple way to do this?

View 9 Replies View Related

Minimize Workbook On Userform Launch

Oct 24, 2006

Is there a way to minimize Excel when a userform is launched, so just the userform is showing? I've tried using "Application.WindowState = xlMinimized" in the UserForm initialization procedure, but it minimizes both the workbook/application and the UserForm. I can click on the Excel window on the taskbar and just the UserForm will display--which is the goal--but I'm hoping there's a way to do it automatically without needing to click the taskbar icon after it's minimized.

View 2 Replies View Related

How To Launch Macro Or Other Userform After Command Button

Apr 6, 2009

I want to launch userform A when the user hits the command button on userform B, I already have a macro set up to launch UserForm A and tried adding it to the code but it doesn't work.

View 13 Replies View Related

Macro - Dialog Box On Excel File Launch?

Jul 8, 2013

I'm looking to create a macro that launches a dialog box upon file launch. Based on the input, I want excel to only show the tab which corresponds to the dialog box entry.

For example, if it asks "What is your name?" on file launch and I respond "Alex"; i want the tab labeled "Alex" to only be shown for the user.

View 1 Replies View Related

Launch UserForm With Double Cell Click

Jan 30, 2008

I've found the code below and tweaked to suit my needs but having trouble. Had it working one time. The code below calls a userform when the user double clicks on a cell. The form pops up and is not active/enabled. I cannot select anything on the form until I select a cell on the sheet, then everything on form becomes active/enabled.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
'check cells for desired format to trigger the frmSel_WBS.show routine
'otherwise exit the sub
Dim NumberFormat, DF
NumberFormat = Array("[Blue]General")
For Each DF In NumberFormat
If DF = Target.NumberFormat Then
frmSel_WBS.Show vbModeless
End If
Next
End Sub

View 2 Replies View Related

Microsoft Word Hangs With Excel Launch Code

Apr 29, 2012

Consider this procedure to execute a MS Word mailmerge from within Excel:

Code:
Option Explicit
Dim objword As Object
Dim odoc As Object
Dim odoc2 As Object
Dim wdsendtonewdocument As Object
Dim mypath As String

Sub merge()

[Code] ........

The application hangs on the line in red. The file name (worksheets("Frontpage").Range("B15")) exists. It hangs with periodic dialogues "Microsoft Office is waiting for another application to complete an OLE action."

I end up having to go into task manager to close the word application before I can regain Excel control again.

View 9 Replies View Related

VBA Shell Command To A Launch Applications On All Computers (no File Paths)

Apr 14, 2006

The VBA shell command is as follows:

programPath = "C:Program FilesInternet Exploreriexplore.exe" ' works
'programPath = "iexplore.exe" ' does not work
Shell programPath + " " + fileToLaunch, vbNormalFocus

but the drawback is that the invoked program (iexplore.exe, at least in my case) needs to have the FULL PATH to where the program exists = the "C:Program FilesInternet Explorer" which may or may not work on someone elses computer. This hardcoding will not work and is not transportable.

Is there a trick to find where the executing program lives? or launching it without the path?

View 9 Replies View Related

Excel 2010 :: Launch Word Docx Embedded Within Spreadsheet

Sep 6, 2013

I have a word docx embedded within my spreadsheet .

Both are on Office 2010 versions and I have named the embedded word doc

docx = CCPBlank (named range)
sheet = Support Data

I want to open the word doc from within the spreadsheet from a user form I already have created for other module calls.

Any simple VBA code to open the embedded docx?

I have looked a previous posts and not sure they are suitable. I have embedded the docx as I want to ensure only that empty version is opened each time. It also means I only have to send one file (xlsm).

View 2 Replies View Related

Launch Link In Order To Copy String From Site Back To Excel

Nov 17, 2013

I have a list of web address in column A. All of the web address belong to the same site and are different products at the store. I want to be able to some how launch the sites and have Excel copy the text string which follows the word "PRICE:" on the site back into Excel into the corresponding cell of column B.

View 3 Replies View Related

Show Userform Or Launch A Userform

Apr 19, 2006

I want to use the following to launch a userform I created.

Sub showuserform()
Dim ans As Boolean
ans = msgbox("do you want to show the userform?", vbYesno)
If ans = vbYes Then
userform.show
End If
End Sub

The trouble is that if I click yes, nothing happens.

View 4 Replies View Related

Add Shortcut Key To A Button

Nov 24, 2009

When i have an excel sheet opened and hit ctrl +f the find replace window displays. I want to add a button on spreadsheet that when i click on it, the find and replace window appears, I can not figure out how to do this. I tried using .onkey

View 8 Replies View Related

Using Ctrl+M As Shortcut

Nov 6, 2008

i have tried using the letter M as a shortcut key (because it is to activate a "Move" function) but unfortunately it doesn't work. I gather from this that not all of the keys are available as shortcut keys presumably because they already have function.

Is there a way around this? and/or is there a list somewhere of the available shortcut keys?

View 13 Replies View Related

Shortcut Key Listing

Jan 23, 2009

Need way to list the active shortcut keys? I know there are manyy lists of the desfault shortcuts, buit I'm trying to generate a list of the curreently active shortcut keys & what macros they tie to. I have a vague recollection that someone had a VBA means of doing this, but I cannot find it in the forums I've searched.

View 2 Replies View Related

Shortcut Key Go To Sheet

Dec 5, 2012

Can I have shortcut key go to sheet, example when i click in cell (BU1) - automatic go the sheet bu1.

View 2 Replies View Related

Run The Shortcut To Stop The Add-in

May 29, 2009

I have an Excel add-in that makes use of an Application-level event handler to detect when workbooks are activated / deactivated, and adjusts the command bars / ribbon accordingly. The add-in also includes a developer mode, so I have a shortcut key to stop the add-in while running, set the .IsAddIn property =False, and then change whatever settings I feel that I need to.

Problem is, when I run the shortcut to stop the add-in, and then run my shortcut to restart it, my event handling no longer works. I've done some MsgBox testing, and verified that the class module's "Initialize" event gets called, but subsequent events (i.e. WorkbookActivate) go unnoticed.

I'm wondering if Excel will allow me to start an Application event handler using WithEvents, stop it (by setting the class module variable = Nothing), and then re-start the event handling.

View 9 Replies View Related

Shortcut To Formula Box

Jul 31, 2006

The one thing that has always bugged me about Excel is that in order to modify an existing cell, I need to click on the cell and then click in the formula box above. If I want to overwrite the contents of the cell, I can just start typing, but if I want to edit it, I need to use the mouse. It really seems like like Alt-D should move up to this window like it does in Internet Explorer. I can move around Most Windows applications without need of a mouse save for this one area.

View 4 Replies View Related

Search Shortcut

Jan 23, 2007

i need to create a shortcut (ideally ctrl-z) that will allow me to search column D which has a tonne of street names in it. i need to do a "custom" search and enter "contains" and then have the field on the right be left empty for me to enter what i need to enter.

I want to hit ctrl-z (or a b c d e f g h etc...) and have that blank field brought up for my to enter something to search for and have all those criteria met "custom-contain-?whatitype?"

I've tried using the record new macro function but it won't let me leave the dialogue box open for me to enter my street name.

i hope i explained that well enough....

basically i want to hit ctrl-z and have that custom-contains for column d open and ready for me to search.

autofilter is on. and i am referring to the drop down menu that lists "top 10" "all" and "custom" i want to chose custom and then chose "contains" from the first drop down menu in the dialog box that pops up.

View 7 Replies View Related

Shortcut Key For Deleting Sheet

Aug 26, 2009

I want to know the short-cut keys for the deleting sheet.

View 3 Replies View Related

Shortcut To Bottom Of Sheet

Apr 7, 2013

I am looking for a shortcut key or some fast way of getting to the last line of information on a excel spreadsheet.

I currently have order spreadsheets with over 10000 lines used and everyday I need to add more lines and if I have used the Shift+F to locate an old order then I can be say sat on line 40 but my last inputted text could be on line 7000 and I would like to know how I can get to that line without knowing the line number.

The shortcut must take me to the last text entered cell not the last cell on the worksheet.

View 9 Replies View Related

Simulating The ALT+DOWN ARROW Shortcut

Mar 31, 2009

Simulating the ALT+DOWN ARROW shortcut. I came up with the hereunder code.

View 4 Replies View Related

Data-Entry Shortcut

Sep 20, 2009

I'm trying to make a macro that will help with data-entry. In two columns of each sheet (columns D and J), I'm entering school grade information ("K", "Pre-K", "1", etc, up to "12"). As I move off of each cell with data so-entered, I want to have the entry formated such that "1", becomes "1st", "12" becomes "12th", etc. I've put code into "Worksheet_SelectionChange" and the code works but...

1. The cell value is not changed upon leaving the cell, only after re-entering the cell. So, I type "1" in the cell, move on (the cell value remaining as "1"), then go back to that cell and the value becomes "1st" like I want. So each cell requires entry and then (for example), left arrow, then right arrow, then move on the next cell for data-entry. Since I'm only saving a few keystrokes for each cell, this approach is just about a wash. I need to have the data changed upon leaving the cell. Is there a way?

2. There are 50 or 60 sheets in the workBook and I have to copy that code onto each sheet. Is there a way to move it to the workBook level? Failing that, is there a way to ease the process of pasting that code to each of the sheets?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved