macros

Viewing compiler expanded code - C++

I learned that compiler will expand macros while compiling. Templates are also expanded at the compile time. Is there any way to see this expanded code? I am compiling using Visual Studio 2008. any thoughts? ...

Why is this file always saved as FALSE.xls ?

Hello! I wrote a VB script that creates an .xls file, based on .xlt file. Then it calls a macro from the .xls file that populates it with information from a database. In the last step the script saves the .xls file on the disk. I did this before with VB and Excel 2003. Now I upgraded to Excel 2007 and before it saves the file, a windo...

To Extract/Display Macro (VBA) from .xls files using VB6 (without openning Excel)

Hi all, I understand it is possible to do so using excel macro, see: http://stackoverflow.com/questions/49724/programmatically-extract-macro-vba-code-from-word-2007-docs But What I want to do here is to use VB6 to make an application which does the same thing. I am having problem on how to point to the excel workbook (thisworkbook.VBpro...

Lotus 123 to Excel 2003 conversion

I have been asked to convert some Lotus 123 wk4 files with macros to excel 2003, I know the data will convert with most formulas. I am wondering if there is a way to convert the lotus macros also. ...

Is there a way to run an outside executable after a SPECIFIC solution is built in Visual Studio 2008?

I had the same question as was asked in this thread, i.e. I was looking for a way to run an executable or script after building a solution in Visual Studio. I tried out the suggested solution of catching the OnBuildDone event with a macro, which (as I understand it) needs to be placed in the EnvironmentEvents section under MyMacros in...

automatically running an access macro

Hello, I have an access macro, that I want to run automatically from a batch file which will be scheduled with windows scheduled tasks. At the moment however the batch file will not continue until I close the access window after it is finished. Is there a way to get access to do this silently? The line I am using is "c:\Programme\Mic...

Trouble Creating Excel add-in from macro.

I've created two VBA macro functions that worked fine when used in the current workbook. I saved as .xla and imported as an add-in. I then found and activated the add-in through the menus in excel but when I use the functions I get the #NAME error and a description of "The formula contains unrecognized text". I'm stuck. ...

How come my Macros are triggered by events in other word documents.

I am executing code on the WindowSelectionChange event in Microsoft Word. How come when I open another document, that does not have this macro referenced in it, the code is still being called on WindowSelectionChange. I do not have the macro stored in the default template, it is stored in a template not referenced by my other word docu...

Partial evaluation for parsing

I'm working on a macro system for Python (as discussed here) and one of the things I've been considering are units of measure. Although units of measure could be implemented without macros or via static macros (e.g. defining all your units ahead of time), I'm toying around with the idea of allowing syntax to be extended dynamically at r...

C #define macros

Hi. Here is what i have and I wonder how this works and what it actually does. #define NUM 5 #define FTIMES(x)(x*5) int main(void) { int j = 1; printf("%d %d\n", FTIMES(j+5), FTIMES((j+5))); } It produces two integers: 26 and 30. But i can't seem to understand how it makes this possible.. Thanks. ...

How to copy data from another workbook (excel) ?

I already have a macro that creates sheets and some other stuff. After a sheet has been created do I want to call another macro that copies data from a second excel (its open) to first and active excel file. First I want to copy to headers, but I cant get that to work - keep getting errors. Sub CopyData(sheetName as String) Dim File ...

How to find and select multiple rows with macro (excel) ?

How do I search a column for a text and select all columns and rows which match the search text ? Sample table: ColA ColB ColC ColD Row1 Bob Row2 Jane Row3 Joe Row4 Joe Row5 Jack Row6 Jack Row7 Jack Row8 Peter Row9 Susan So the marco searches for "Jack" then it s...

excel 2003 VBA: macro not found

hello i keep getting an error when calling a function via the OnTime method i tryed what's written here (and even posted a comment in the end) and i keep getting an error: "The macro 'I:\myFolder\test.xls'!MacroName was not found". when calling the function MacroName from anywhere in the script, it works fine. thanks in advance for any ...

Run Macro to Update Cells

I have quite a few cells that link to other worksheets/books, etc with standard excel formulae. However, is there a macro I can run that will only allow these cells to be updated when it is run? I'd like them to retain their previous values until I want them to update. ...

Is it possible to modify the output of a macro in VS 2005?

Hello, I'm using the Custom Build Rules feature in Visual Studio 2005, which allows to use macros such as $(ConfigurationName) in the XML .rules file. I need to pass only a subset of $(ConfigurationName) as a parameter to my command-line tool: If my target is named "DebugBuild", I'd like the command to end up like "tool.exe -Debug". ...

Inline ostringstream macro reloaded

Referring to http://stackoverflow.com/questions/303562/c-format-macro-inline-ostringstream The question there was for a macro that allows inline concatenation of objects to create a string, iostream-style. The answer was: #define SSTR( x ) dynamic_cast< std::ostringstream & >( \ ( std::ostringstream().seekp( 0, std::ios_base::...

Progress bar using Office VBA

I have a small programme that opens and closes a number of different word documents while it runs. It loads some documents from the web so it takes a little while and I'd prefer to let the user watch a little progress bar or at least have a message in a form telling them to wait. I can't seem to be able to keep that form on top of all o...

How can you make Game of life in Excel?

I know only little how to make macros in Excel. ...

Space after LaTeX commands

I have a definition \newcommand{\arnold}{Arnold Schwarzenegger} when I refer to it by \arnold is a it is rendered as Arnold Schwarzeneggeris a In order to have a space in front of "is" I would need to write \arnold\ is a Is there another and shorter way? ...

CUDA compiler (nvcc) macro

Is there a #define compiler (nvcc) macro of CUDA which I can use? (Like _WIN32 for Windows and so on.) I need this for header code that will be common between nvcc and VC++ compilers. I know I can go ahead and define my own and pass it as an argument to the nvcc compiler (-D), but it would be great if there is one already defined. ...