macros

How to redirect visual studio visual basic macro output to the output window?

I'd like to run a Visual Studio macro which is a command line tool, and have the results appear in the output window of Visual Studio. ...

Pass an absolute path as preprocessor directive on compiler command line

Hi all, I'd like to pass a MSVC++ 2008 macro into my program via a /D define like so /D__HOME__="\"$(InputDir)\"" then in my program I could do this cout << "__HOME__ => " << __HOME__ << endl; which should print somethine like __HOME__ => c:\mySource\Directory but it doesn't like the back slashes so I actually get: __HOME__ ...

Given the the following LISP eval function - what is required to add defmacro?

Given the following definition of the LISP eval function - what is required to add the defmacro function? (Or even just evaluate a macro) (defun null. (x) (eq x '())) (defun and. (x y) (cond (x (cond (y 't) ('t '()))) ('t '()))) (defun not. (x) (cond (x '()) ('t 't))) (defun append. (x y) (cond ((null. x) ...

MS Word - Find all instances of text in yellow and change font colour to red

Hi, I need a vba macro that searches for all text that has font colour as yellow within a MS Word 2007 document and changes it to red. The yellow color won't show in the printouts. Manually selecting and changing will take me hours :( Thanks. ...

Excel macro to create and then fill a column with the same word/value?

I need a macro that will create a column called "Store". Then, the macro should fill all active rows below with the word "admin". Any ideas how to get this done? Thanks a million for helping! ...

Get typedef of current class

Hi there, I'm currently using boost::intrusive_ptr together with my GUI classes. Although this is more or less a convenience question, is there a proper way to get the typename of the current class? The reason I'm asking is that I have a macro for typedef'ing the different pointer types: #define INTRUSIVE_PTR_TYPEDEFS(CLASSNAME) typede...

Creating a dashboard in exel

Hi guys, I am looking at creating a dashboard in excel using several key performance indicators to plot a graph, the data would just be collected from another sheet in excel. I understand that you can do this in conjunction with macros but my experience with macros is limited although I am willing to learn. Any help would be great! Th...

C Error Checking Function (Not really homework, but don't say I said it wasn't)

For my systems programming class we're doing a lot of programming in C and are required to error check most functions as we are currently learning to program with pthreads. The reason I say this is not really homework, is that it is far above and beyond what is expected for this class. Simply checking each function individually is more ...

Simple Yet Compelling Macro Examples which are Not Already in Clojure

Hi, I'm trying to write a macro tutorial, and now I need some examples which are simple to understand, and yet compelling. The problem is that a lot of the obvious things are already in clojure and contrib. And I feel that "look, we can reimplement all the library functions" might not be the best argument for why macros are so great. H...

Visual Studio 2010 Macro problem - Quit Working all together

Hi, I built a macro today in VS.. testing as I went, and it worked great. I proceeded to build another, but accidentally pasted it into EnvironmentVariables Module... I removed it, and saved, but now no Macros that I create work. I tried the built-in samples, such as insert date, and it worked, but nothing custom works. Thanks, Ben ...

Strange #define in Template?

Hello, I've got a small bit of code from a library that does this: #define VMMLIB_ALIGN( var ) var template< size_t M, typename T = float > class vector { ... private: // storage VMMLIB_ALIGN( T array[ M ] ); }; And you can call it by doing //(vector<float> myVector) myVector.array; No parenthesis or anything. what? Afte...

How to consolidate data by domain in excel?

I have a spreadhseet that looks something like this: Referrer --- Clicks --- Conversions http://google.com/search?q=hello+world ---- 12 ---- 3 http://george.com ---- 4 ---- 1 http://google.com/search?q=yeah ----- 3 ---- 3 http://george.com/2010/3/this-blog ----- 4 ---- 0 http://www.wave-runner.com/hey ---- 3 ---- 0 How can I write a m...

Column count check for csv before the csv is loaded in multiple worksheets using macro

Hi, I have an workbook with 3 worksheets.I want to load the a single sectionedwise csv to the multiple worksheets but before loading the csv I need to do the column count check to ensure that correct csv is loaded. the csv will be as follows : #3GMACRO,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,, IMSI,IMEI,Date,Time,UMTS MACRO-PARAMNAME,...

inline functions

Possible Duplicate: Inline functions vs Preprocessor macros hello can somebody please explain what exactly does it mean, and what is the difference from regular macro(I know that it works during compile time and not preprocessor but so what?) thanks in advance for any help, looked in google but didn't find something understand...

multi thread in Excel 2007

Hello All, I have a question/problem on running a macro with some level of concurrency in Excel 2007. Here is my situation. (1) I am using Excel 2007 (2) My PC is an Intel Dual-Core. (3) For this test, macro is very simple and defined in a module. Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Function simple_macro(...

Can you have a Excel Macro to auto-save a copy as CSV

Loading an XLS file is a bit of a pain for a quick app we're throwing together (we know about how to do that but it's not worth the time especially in C++) so we're going to take the simple approach of have the user export a CSV copy. However to save them the trouble I wondered if we can have a macro which will automatically save a CSV v...

Can macros be used to simulate C++ templated functions?

I have a C program in which I need to create a whole family of functions which have the same signatures and bodies, and differ only in their types. What I would like to do is define a macro which generates all of those functions for me, as otherwise I will spend a long time copying and modifying the original functions. As an example, one...

Excel VBA - Create Multiple Columns on Sheet2 from 1 column on Sheet1 with logic

I am new to VBA and i am struggling trying to make this work. I am in need of a macro that will process each cell\Column on Sheet1 and Put the Results on Sheet2. I'm sure this is pretty easy for those who are more advanced with VB code. It contains many columns.. Anytime we encounter a "—" or an empty cell we populate the cell with -999...

Microsoft office Macro - Why is the document jumping around?

Hello All, This if the first time I write a Microsoft Office Macro. Basically, we have a few check boxes on page 1 and when one of them is checked, I need to auto-fill a text box on page 10 depending on which check box was checked. So each checkbox "on Entry" runs a macro. Say the options are "Outstanding", "Exceeded" and "Unsatis...

Microsoft Office 2007 Macro - Odd behavior. Cursor Jumps

Hi, I hope someone have some insight into this. I have a check box on page 1 and when it's clicked, it will launch a macro & insert a value to a text box on page 10. Simple The problem is, the script in the macro is looking for the value of another text box on page 5 to do some calculation. Whenever i do text5value = Val(oFFld("Text5...