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 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?
I have a pivot table as shown below which is pretty straight forward however I am trying to create a macro that will automatically change the point name to match the point name in column E then copy that resulting dispaly to another sheet then pick the next point name in line and do the same thing and repeat for 50 rows, so my end result will be 50 pivot tables ready for printing. I can do this manually but I am trying to make it automatic...BTW the point names in column E change everyday but the pivot table supports the name changes.
Option Explicit Sub PointName() Dim Ws As Worksheet Dim Rng As Range, Cel As Range
Set Ws = ActiveSheet Set Rng = Range(Cells(2, 7), Cells(Rows.Count, 7).End(xlUp))
For Each Cel In Rng Ws.PivotTables("PivotTable1").PivotFields("Point Name").CurrentPage = Cel & " "
Ws.Columns("A:B").Copy Sheets.Add With ActiveSheet .Paste .Name = Trim(Cel) .Range("A1").Select End With Next Ws.Activate End Sub
I turned it off for a while and when I turned it back on I am getting an error Unable to set the _Default property of the PivotItem class
Debugger is highlighting
Ws.PivotTables("PivotTable1").PivotFields("Point Name").CurrentPage = Cel & " "
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.
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"
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
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.
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
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.
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.
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.
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.
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.
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
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.
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?
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).
I am struggling to find a macro which can look at a name in column 'BT' and search it in the address book of Outlook to then place the email address of that person in column 'ED'
There are 35,000+ people in the address book and there may be over 5 email addresses for one name, so is there any way a message can appear for the user to select which email address is correct if there is more than 1 contact for that name?
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.
Assume the following list of addresses are all in separate cells of a single column (A1-A4). I just need the formula to extract the street addresses, and then a separate formula to extract the zip codes.
5430-44 PASCHALL AVENUE PHILADELPHIA, PA 19143 OPA/BRT#: 884350845
4010 MARPLE STREET PHILADELPHIA, PA 19136 OPA/BRT#: 651087200
2618 SOUTH HOWARD STREET PHILADELPHIA, PA 19148 OPA/BRT#: 391251216
5737 WOODCREST AVENUE PHILADELPHIA, PA 19131 OPA/BRT#: 522155600
On a worksheet called "Contact Info" column A starting in row 2 I have a list of names (variable length). In Columns B2-D I need the email address, work phone number, and cell phone number.
I want to pay salespeople a bonus when they sell things at a higher Gross Profit. There is a minimum markup. I want to say for every additional point above the floor (F) well pay (B*C). There is also the actual attainment filed (A). For this example lets say the floor (F) is 22% and the actual attainment is 26%.
What I want is: if A >= F THEN for EACH POINT above the floor add 1*(B*C)
Its actually buried in a larger IF(AND function and I need to be able to drag the function down a long column and have it scale with volume sold. But its just this bit of logic I'm hung up on.
The top row is just 0, 1, 2, 3 The bottom row is something like: 850, 790, 200, 250
Here's the problem: I want to find the midpoint of the data set in row 2, based on the values in row 1. So, the sum of the data in row 2 in this example is 2090, meaning the midpoint is 1045.
If we were traversing along the top row as a line, we'd find that midpoint somewhere in the 0.3 range... but how do we get that value?
I am trying to create a database for part stock but with only one entry point that is in image 1 you would select the machine and part from drop down lists and hit add. It would then lookup the corresponding machine and part and subtract 1 from the current stock database.