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
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.
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"
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.
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.
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.
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.
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?
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.
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)
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
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.
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?
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?
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.
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.
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
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
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.......................................
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.
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.
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... :-)
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