Call External Executable From 2007

Nov 13, 2009

I wrote an external executable ("graph.exe") which is supposed to save a .xlsm file, close it, read some data from it, do some calculations, and print the results back into the same spreadsheet.

When I double click "graph.exe" everything works. So I created a button in the spreadsheet I mentioned that should call "graph.exe" and therefore initiate the whole process. Here is the

View 5 Replies


ADVERTISEMENT

Display Last Modified Username In A Call (of Several External Excel Files Not The Current)

Mar 7, 2014

I am trying to put this in about 25 cells to point at 25 different files. Basically I am trying to keep an eye on when the files have been updated each morning so that I can then pull off some data from them and who saved it.

I solved the first part (see next post) but I still havent been able to get it a function pull off the username.

View 1 Replies View Related

Excel 2007 :: Call Sub Using Variable?

Feb 23, 2013

I'm trying to call another sub with a variable string. I'm using excel 2007. I get the error "Compile Error: Expected Sub, Function, or Property" on the "Call" code. The want the code to run multiple different subs based on user input. For example if they typed "this" it would run the t sub, then h sub, then I sub and finally the s sub.

Code example

Dim Uncvrtdtxt as string
Dim SubName as string
Dim i as integer
Uncvrtdtxt = "this"
For i =1 to Len(Uncvrtdtxt)
SubName = Mid(Uncvrtdtxt, i, 1) & "Route"

[code]....

View 7 Replies View Related

Automatically Update External Links To Csv File In 2007

Jan 28, 2010

I have an Excel 2003 workbook (named TargetWorkbook.xls) with some links to a CSV file called DataSource.csv. I use Excel 2007 to open the workbook. I checked the "Update links to other documents" option under the "When Calculating this workbook..." section on the Advanced pane of the Excel Options window. I unchecked the "Ask to update automatic links" option under the "General" section on the Advanced pane of the Excel Options window. I selected the "Don't display the alert and update links" option on the Startup Prompt dialog (accessed from the Edit Links dialog) I created a simple Auto_Open macro with the following statements:

Sub Auto_Open()
Workbooks.Open Filename:="C:ProjectsExcelTestDataSource.csv", ReadOnly:=True
Worksheets("DataSource").Activate
Workbooks("TargetWorkbook.xls").Activate
Windows("DataSource.csv").Visible = xlVeryHiidden
End Sub

The DataSource.csv file is updated daily. I want the cells of TargetWorkbook.xls to automatically update from the csv file when I open TargetWorkbooks.xls without displaying a prompt. I plan to deploy this workbook to a server and open it programatically via a Windows Service (I know, I know, Microsoft doesn't encourage this)and can't have it throwing up a user dialog.

Here is the problem: When I open TargetWorkbook.xls manually using Excel 2007, it updates the links but throws up the dialog "This workbook contains one or more links that cannot be updated...". When I click on the "Edit Links..." button, it displays the message "Warning: Open source to update values". When I click the "Check status" button for this link, it says "Source is open". How do I prevent this dialog box from poping up? I've been wrestling with this for a few
days now and can't find a solution.

View 2 Replies View Related

Code Syntax Valid And Executable In Vba

Apr 6, 2007

Is this Excel VBA code syntax valid and executable?

Range(ActiveCell, ActiveCell.EntireRow.UsedRange.Columns.Count).Copy

If so, what exactly does this code line achieve?

View 2 Replies View Related

Excel 2007 :: Any Way To Call Security Alert To Enable Macro

Jun 28, 2012

I'm trying to find out if there is a way to call the security alert to enable a macro. Let me explain...I was working on a sheet with a macro that I hadn't enabled yet. After working for awhile the option to enable it was gone and I found that I had to close the fine and re-open to enable the macro. I'm wondering if there is a ribbon or short cut icon to put in my access toolbar that will give me the option to enable/disable the macro. Seems strange that in 2003 I could to this, but in 2007 I have to close the file.

View 3 Replies View Related

How To Add / Insert Or Embed Executable File In Excel

Mar 2, 2014

I am making one project in excel where I want to add time zone converter Or time zone search in engine in excel for that purpose I have create one portable software for time conversion but I am unable to add or insert or embed it in excel as it is an exe file.

I have attached one winzip file that is carrying Age Calculator in it so that you can have a brief understanding about how does the portable software looks like, age calculator is a portable software as it does not need installation & it works as we run it. I am also attaching excel demo file with it by the name ""time zone", its rough simulacrum of my original project file.

Attached Files

Age_Calculator_v2.zip‎
time zone.xlsx‎

View 2 Replies View Related

Excel 2007 :: Viewing SQL Statements Without Being Connected External Date Source

Jun 3, 2012

I now have XL 2007 but no longer work at the same place so do not have access to the external data source. I would like to view the SQL statements that I wrote back then but keep getting error that I am not connected to external data source and so cannot see my sql statements. I have MS Query 2007.

View 1 Replies View Related

Excel 2007 :: Change Source Workbook For All External References At Same Time But Avoid Browsing?

Jan 7, 2013

Need to create Working order (in Excel 2007) for filling machine in my factory. Working order is changeable from day to day and the deference is product quantity. Product quantity in working order [File - Working order] is changing according to the each sales plan [7-Jan-13, 8-Jan-13] - (File Working order is Linked to the appropriate sales plan in this case - [7-Jan-13]).

Anyway, I need to change the source workbook "sales plan" from [7-Jan-13] to [8-Jan-13] by changing source workbook name in red cell [File - Working order] and not to browsing location?

All source workbooks [sales plan 7-Jan-13, 8-Jan-13]are at the same location in the same folder, only difference is the source workbook names. So, is it possible to change source workbook name (File - Working order - red cell) for all external references (File - Working order - green cells) at the same time, and avoid annoying browsing?

View 14 Replies View Related

Excel 2007 :: Data Validation List To Control External MS Access Table Embedded

Jul 11, 2013

I am familiar how to perform the task of bringing in an access table into excel, then using a data validation filter to control the data set in Excel 2003.

How to replicate this procedure in Excel 2007?

View 1 Replies View Related

Lookup Function Call: Vlookup Call In Sheet

May 21, 2006

I have a work book with 3 sheets. Sheet 1 is the main sheet and sheets 2 and 3 will use (I hope vlookup) to update 3 columns from info in sheet 1. my attempt at a vlookup call in sheet 2 is: =VLOOKUP($b3,[master_AoJ_2.xls]Sheet1!$B$3;$B$65,false)

my understanding is that: - $b3 is the cell in sheet 2 that will be updated as a result of the vlookup call. - [master_AoJ_2.xls]Sheet1!$B$3;$B$65 refers to range $B$3:$B$65 on sheet1 of master_AoJ_2. it does not work... infact I get nothing at all. when I type the call into cell $b3 of sheet2 excel thinks it is stariaght text. this is how I coded the function call =VLOOKUP($b3,[master_AoJ_2.xls]Sheet1!$B$3;$B$65,false)

View 4 Replies View Related

Call Sub

Jul 18, 2007

I am using a user Form in excel VB

I have a bunch of text boxes on another form. What set of text boxes i use depend on what illertation I am on, "counter". I am calling the sub which uses the "Select Case" code to figure out which textbox to use.

When I run it, it reaches the call, goes into the sub, and when it exits the sub it screws up. It says "Type miss match"

Intresting note, if you click play again, it works right away untill it runs another illertation through and gets back to that spot.

In the call function in the code below, all variables have Nothing in them when I put my mouse over them in debug. When I say nothing it actually says like textboxy = Nothing

counter has 1 to start.

Here is my code

Call subcase(textboxy, textboxM, textboxMa, textboxw, textboxd, checkboxx, counter)
and here is the sub! thanks again!

Sub subcase(textboxy, textboxM, textboxMa, textboxw, textboxd, checkboxx, counter)

Select Case counter

Case 1
Set textboxy = frmNewItemMore.txtYear1
Set textboxM = frmNewItemMore.txtMonth1
Set textboxw = frmNewItemMore.txtweek1
Set textboxd = frmNewItemMore.txtDay1
Set textboxMa = frmNewItemMore.txtPM1
Set checkboxx = frmNewItemMore.chk1

View 9 Replies View Related

Call .exe From VBA

Jan 1, 2008

I want to run an .exe program from Excel, so I used the shell method. This program should read in some input in text format. However, when I call from Excel, the prgram cannot read the input. When I run the program alone, it is OK.

View 6 Replies View Related

External Data From The Web

Jul 8, 2014

I'm trying to make a spreadsheet that references data tables I have pulled from the internet, with the hopes that these tables will update as I refresh the data connections. I'm in the early stages of creating this spreadsheet right now, but whenever I try to refresh my data connections, it takes a tremendous amount of time. I have about 6 connections with 100 row lines total. Is this typical with data connections to the web? Is there a better way to do this?

View 1 Replies View Related

Protect Call

Dec 8, 2008

I can protect my all sheet in excel but How to protect single cell or column, row? Is there any code for protect.

View 14 Replies View Related

Need Macro To Call UDF

Apr 29, 2014

I have UDF and would like to use a Macro Button to have it run whenever I need to. Now I have to disable macros with notification in trust center and after entering data, enable content. I have my UDF in a module, is it possible to have another module with a macro so I can run this UDF whenever I need to?

[Code] .....

View 7 Replies View Related

How To Get The External Data

Apr 27, 2013

i have to take the PGN chess game notation file into excel.it is a text file from notepad. it is like this as shown hereunder. how can i get this into columns movewise. ex.1.d4 Nf6 should come in A1 and 2.c4 d6 should come in A2.

1.d4 Nf6 2.c4 d6 3.Nf3 Nbd7 4.Nc3 e5 5.e4 Be7 6.Be2 O-O 7.O-O
c6 8.Qc2 Re8 9.Rd1 Bf8 10.Rb1 a5 11.d5 Nc5 12.Be3 Qc7 13.h3
Bd7 14.Rbc1 g6 15.Nd2 Rab8 16.Nb3 Nxb3 17.Qxb3 c5 18.Kh2 Kh8
19.Qc2 Ng8 20.Bg4 Nh6 21.Bxd7 Qxd7 22.Qd2 Ng8 23.g4 f5 24.f3
Be7 25.Rg1 Rf8 26.Rcf1 Rf7 27.gxf5 gxf5 28.Rg2 f4 29.Bf2 Rf6
30.Ne2 Qxh3+ 31.Kxh3 Rh6+ 32.Kg4 Nf6+ 33.Kf5 Nd7 34.Rg5 Rf8+
35.Kg4 Nf6+ 36.Kf5 Ng8+ 37.Kg4 Nf6+ 38.Kf5 Nxd5+ 39.Kg4 Nf6+

View 5 Replies View Related

Call Function By Name

Aug 30, 2007

Just wonder how to call the function if I have it's name in the variable String
for example something like that:

View 11 Replies View Related

Get External Data From Web?

Jan 10, 2013

I am creating a tool that many people will be using. I need a way to do the following from vba:

1. Click on the "From Web" button under Get External Data section in Data and show the web query pop-up

2. Input the url into the field and press enter

At this point, it will be the user's responsibility to log in w/ their username and password. I have tried to record a macro w/ no success. I just need to get the query open for the user without them having to do anything.

View 2 Replies View Related

How To Call Sub With Arguments

Sep 30, 2013

I've heard of calling a sub with arguments but don't believe I'd done it in the past. I want to remove the empty rows in 3 worksheets so that my row count actually stops where the existing data does. The second sub is where that takes place. What is the best way to call the sub to execute on the three sheets?

My thinking had been that if I used the argument ws as worksheet I could simply call the sub with the worksheet name as the argument.

Code:
Option Explicit
Sub PopulateProfit()

Dim wb As ThisWorkbook
'Dim ws As Worksheet
Dim wsProfRep As Worksheet
Dim wsChaseRaw As Worksheet

[Code] ..........

View 7 Replies View Related

How To Call The Function

May 10, 2007

I wrote a function procedure in VBA. Pasted it into a 'VBAProject' sheet in my workbook. But when I try to call the function (by entering the name and arguments into a cell), the sheet displays "#NAME?".

What have I forgotten?

example:

Public Function TotDays( _EndDate As Date, _StartDate As Date _) As Integer
TotDays = EndDate - StartDate
End Function

cell
a5: =totdays(b2,A2)
b2: 4/1/2007
a2: 3/1/2007

View 9 Replies View Related

Call An Add-in Function From VB

Jul 12, 2007

I created a file with one sub and one function. Saved it as an add-in. and followed the promts to insert the Add-in.

The button I assigned to the macro works fine, but when I call the function, I am told "Sub or Function not defined".

Is there some special way to call an add-in function from VB?

View 9 Replies View Related

Funciton Call Up A Value

Aug 17, 2007

I have three macro's.
1) Execute
2) CreateMatrix
3) CollectDebtCount

What I want to do is have the macro called Execute call up and trigger CollectDebtCount macro and CreateMatrix macro.

My problem is the value to limit the For/Next block in CreateMatrix is not using the value generated by the CollectDebtCount.

An example of the output is as follows: If the user enters the number 3 to the question "How many different type of debt do you own?", then the macro CreateMatrix should generate the list starting in cell A2, the value = 1, then in cell A3, value = 2, and in cell A4, value = 3.

Sub CollectDebtCount()
Dim Question
Question = InputBox("How many different type of debt do you own?")
Trim Question
End Sub
Sub CreateMatrix()
J = 2
I = 1
Dim Count
For Count = 1 To Question
Cells(J, I).FormulaR1C1 = Count
Count = Count + 1
Next.......................................

View 9 Replies View Related

Call Another Program Using VBA

Jun 9, 2008

How to call another program from excel using VBA, then excetue commands within it.
All the commands are text based, and the program will respond to it, but i am not sure how to automate this.

View 9 Replies View Related

How To Get External Data From...itself

Dec 3, 2008

I have some data in tabular form on a sheet. I want to represent this data on a different sheet, but have it be dynamically updated. I'm thinking that the smartest way would be to give the original data a named range, then do some sort of external data referencing to the source from Data - Import External Data. But this sounds kind of silly.

How do I do this? And no, I don't want to use pivot tables because I don't have statistics to populate in the cells...I just want to display the data as is.

View 9 Replies View Related

Api Call For Add-in Folder

May 9, 2007

Is there and API call I can do to determine a user's default add-in folder for Excel add-in ?

View 9 Replies View Related

Run External Programs With VBA

Oct 26, 2007

I'm wondering if it is a all possible to have a VBA macro call another program (like a Perl scripts, or a Python script) from within VBA?

I have no idea if this is possible. I know that people often write programs which call other programs, but would have no idea where to get started on this.

If it IS possible, can you tell me if it is is extremely complicated?

I have to have a VBA script read some complicated text files, and parse and extract information from them. Perl is so great at this, and I seem to get a headache trying to do any pattern searching and matching with VBA. If it was instead possible to write a Perl script, which is then run by VBA, that would make my life so much easier... :-)

View 3 Replies View Related

Call Procedure From Add-in

Nov 27, 2007

I have a userform in an add-in (which is loaded), when I try and call it from an excel sheet, I get the following error "Variable not defined"

Private Sub CommandButton3_Click()

UserForm1.Show

End Sub

The code in the userform is all private subs.

Similarly when calling a public sub from the add-in such as;

Private Sub CommandButton3_Click()

Call SillySub

End Sub

I get the error "Sub or Function not defined".

How should I be doing this?

View 3 Replies View Related

Call A Sub Procedure From Another

Jun 19, 2008

how do you call another sub's function from another sub? For example:

Sub Worksheet_SelectionChange(ByVal Target As Range)

StartingDate:
Static STempHolding As String
If STempHolding <> "" Then OldStartingDate = STempHolding
STempHolding = Target.Value

EndingDate:
Static ETempHolding As String
If ETempHolding <> "" Then OldEndingDate = ETempHolding
ETempHolding = Target.Value

End Sub

If i just wanted to call the StartingDate function, from my Worksheet_Change sub how would i do that?

View 5 Replies View Related

Call Macro Using Variable As Name

Feb 7, 2014

I am trying to run different macros by clicking various different buttons on the sheet, I then want different data to load into the user form depending which button was pressed. So I have buttons named "SV_1" and another named "SV_2". when either button is pressed then it runs a common macro that gets the name of the calling item. then I want to add "Macro" to the beginning of the calling item name and then call that macro. here is the code that I am working with, when using a watch i can see the value of the variable is "MacroSV_1" when button 1 is pressed but I cannot get it to run the Sub.

VB:
Public ClkBtn As String
Public CallMacro As String

Sub ItemCall()

[Code] ......

View 5 Replies View Related







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