macros

Generate data in Excel using Macros?

I need to create a table with the following structure: Applicant | Test 1 | Test 2 | Test 3 | Test 4 | Test 5 | Test 6 | 1 | A | C | D | E | F | B | 2 | C | B | A | E | D | F | 3 | C | A | F | E | B | D | .... | ...

Create Macro With Several Variables

I have several worksheets with similar code, so I'd like to turn it into a macro. My only problem is that there are several variables. So at certain points the code looks like this: Dim Msg1 As String Dim Msg2 As String Public Sub ListBox1_LostFocus() ListBox1.Height = 15 With ListBox1 Msg1 = "'" For i = 0 To .ListCount - 1 ...

Can I make a LaTeX macro 'return' a filename?

I'm writing my thesis/dissertation and since its an on-going work I don't always have the actual images ready for the figures I put into my document, but for various reasons want to automatically have it substitute a dummy figure in place when the included graphics file doesn't exist. E.g. I can do something like \includegraphics[width=8...

translating LOOKUP from VBA into excel formula

i have a formula that looks like this in VBA: ActiveCell.FormulaR1C1 = "=LOOKUP(""ETG_C"",RC[-10],RC[-8])" what would be the exact equivalent of this if i simply input it into the worksheet? ...

excel IF formula question

i am building a formula like this: =if(a1="something" or a1="alex","returned","not found") but i guess the syntax is wrong. what is the correct way to write this? ...

Return values only if they are not present in current column

I have a column to which I am adding data from another column I would like to check whether that column has the data that I wish to add. Can you help me with a formula that will tell me whether a certain value exists in the current column? Please keep in mind it is a bit more complex than it sounds. Currently I have this in the cell: ...

Why the macros in Objective-C / Cocoa?

I'm coming from a place without macros (Java/Python/C#/Scala) so perhaps my perspective is distorted but... Why are macros used in Cocoa? Two that spring to mind are NSLocalizedString and NSAssert (and STAssert). Would it be so hard / unsuitable to make them functions (which could be inlined)? I suppose I find them a little bizarre as a...

Strange behaviour of keywords within macros in Clojure

I'm a little confused by how keyword accesses seem to behave in Clojure when they are evaluated at macro expansion time. The following works as I expect: (def m {:a 1}) (:a m) => 1 However the same keyword access doesn't seem to work within a macro: (def m {:a 1}) (defmacro get-a [x] (:a x)) (get-a m) => nil Any idea what is goin...

How do you operate Delphi's macro recorder?

I am using Delphi 2009 and I noticed that there is a macro recorder below the code editor. How do I use it? ...

How to remove a specific category on a selected mail in Outlook 2003 with Macro?

Hi, I am trying to transform my Outlook2003 into the closest thing to gmail. I started to use categories, which are pretty similar to labels in gmail. I can assign categories automatically with rules, and I can add categories manually. I have also created "search folders", that show all mails with a given category, if they are not in...

Variable arguments and function overloading

I am trying to improve SQLite error handling in an existing C++ program. I have a custom type SQLiteException, and I want to write a macro to print the line number, file name, and error messages from SQL. I have the following functions defined: LogMessage(LPCTSTR message); // Does the real work. Appends a timestamp to the message and...

Excel Macro to find text in cell and insert hyperlink on cell

We're managing some system bugs in a web system and setting priority for execs in a spreadsheet. Each of the tickets has a "FD-" and four numbers as the ID. The web system has a hyperlink that has that "FD-####" at the end of the link. The end result would look like this -- http://www.mytickets.com/FD-#### I'd like to run a macro that f...

Creating a list of symbols in latex

I'm trying to get an auto generated list of symbols in my latex project. Here is the macro that I have so far... \newcommand{\addsymbol}[3]{% \symboldisplay{#1}{#2}\\% \setelem{#3}{#1} } \newcommand{\symboldisplay}[2]{% $#1$ \parbox{5in}{\dotfill #2}% } \def\setelem#1{\expandafter\def\csname myarray(#1)\endcsname} \def\dispsymbol...

Extract the VBA code associated with a macro attached to an Action button in PowerPoint

I have about 25 PowerPoint presentations, each with at least 45 slides. On each slide is a question with four possible answers and a help button which provides a hint relevant to the question. Each of the answers and the help button is a PowerPoint Action button that launches a macro. I am attempting to migrate all the questions/answer...

How do I define functions using Racket/PLT Scheme macros?

I am trying to write a macro that defines a special class of data structure with associated functions. I know this is possible; it is done multiple times in the core language itself. As a specific example, how would I define the define-struct macro in Scheme itself. It needs to create make-struct, struct-<<field>>, etc functions. I tr...

How are macros evaluated in C?

#ifdef CONFIG_IP_MULTIPLE_TABLES struct fib_table * fib_hash_init(int id) #else struct fib_table * _ _init fib_hash_init(int id) { ... } How's the value of CONFIG_IP_MULTIPLE_TABLES populated? ...

How to write (simple) macro?

I need to write a macro (with-hooks (monster method who what) &body body) for a game I'm writing. Monster is a CLOS object, method and who are strings and what is a function (#' notation). The macroexpansion would be something to the effect of (add-hook monster method who what) ,@body (remove-hook monster method who) I have absolutely...

Script/plugin to update web page (load next 25 comments) until page fully loaded

Brief summary: I need a script/plugin for Firefox that selects the "load next 25 comments" link at the bottom of a web page, until that link is no longer on the page. As you click that link - you get more comments - eventually all of them on the same page. See this web page for an example (there are 1,852 comments): http://www.cnn.com/...

word macro to save a selected range into database.

Is there a way in word to save a selected portion into the database(Ms Access) as range object.So that we can later retrieve it . It is required to generate a report in word ,the section needs to be repeated many times. I have searched net for quite some time but not much material is found. thanks. eg:In a Resume automation application. ...

Can a macro also generate a method name?

Is it generally valid that a macro is used to create a method name? I mean...actually it's just simple text replacement before the compiler actually runs, right? ...