macros

Excel Macro: Select cells on condition and use as data validation list

Hi, I'd like to select all cells (except the first one) from column A of sheet B that are not empty, and use it as the list for data validation on a range of sheet A. I already have code to add the validation: Cells.SpecialCells(xlCellTypeFormulas).Offset(0, 1).Select With Selection.Validation .Delete .Add Type:=xlValidateList,...

C++ / VS2008: Performance of Macros vs. Inline functions

All, I'm writing some performance sensitive code, including a 3d vector class that will be doing lots of cross-products. As a long-time C++ programmer, I know all about the evils of macros and the various benefits of inline functions. I've long been under the impression that inline functions should be approximately the same speed as m...

Is it possible to copy from MS Word document to a web page input box programatically?

Is it possible to do this via a macro? in an already open word document select all text copy selected text to clipboard check default browser open at correct web address if not open default browser at web address "http://thisaddress.com" give focus to browser paste clipboard text into input box called "input1" or some other way to ...

Combine Multiple Worksheets Into One Worksheet

Hi, How to combine multiple worksheets into one worksheet, in an excel workbook ? Also, for the combined worksheet, how to add in the respective sheet name to allow tracking purposes ? Thanks ...

Flex 4 Run/Debug Path - How to use Macro/Variable there?

Let's say that I want all my programs under a flex project to go to a new url, with the name of the program's html and swf as variables. Now, normally, it's going to hardcode Foo.mxml to a URL of: file:///local/wherever/project/bin-debug/Foo.html But I want it to go to: http://localhost/elsewhere/?a=Foo.html?b=Foo.swf Now, I can do...

How to call a macro on a button click in a word document

Hi, I'm new to macro programming in VB, and what I'm trying to do is clone a row in my word document when a button is clicked. I've made an attempt as shown in the picture below. What do I need to do to make the addTwoDependants() subroutine run when the button is clicked? ...

Converting single PDF document to JPG's named by page name

Hello, I need to take 1 PDF document that has about 92 pages inside, and make every page of it into a JPG file. But the JPG files need to be saved as the PDF's page name. Each page in the PDF is called say "Template: tpl_9043", and I want the JPG filenames stored as such. Is there such an application to use a page number macro? I kn...

Looking for Windows macro utility that creates toolbars that can be docked in other Windows apps

About 10 years ago there was a macro utility that created toolbars that could be docked within other Windows applications. I can't remember the name of this product and have been unable to find it via Google. Are there any Windows macro utilities that have this capability? I've seen some utilities like Quick Macros (QM) that allow one t...

How to concatenate two wide strings using a macro in C?

I want to concatenate two wide strings using a macro, so I define some macros: #define VERSION_MAJOR 1 #define VERSION_MINOR 1 #define VERSION_BUILD 0 #define VERSION_REVISION 0 #define _STR(s) #s #define STR(s) _STR(s) #define _TOWSTRING(x) L##x #define TOWSTRING(x) _TOWSTRING(x) //http://stackoverflow.com/questions/240353/convert...

Text Format in Excel using VBA

Hi, When I use WinSQL to run a SQL statement, the result is 20100803000001812. However, when I incorporate the SQL as a macro, the result is 2.01008E+16. What should I do in the macro in order to maintain the result as 20100803000001812 ? Thanks, Bob ...

a macro to extract characters of its input text and generate a code using them.

Is there any macro that can get a text as input like "abc" and by text I literally mean text like the one mentioned not an array or anything else, then extract characters of that text and generate a selective piece of code like ones below at compile time: first example of a piece of code : Func1(a); Func2(b); Func3(c); second example ...

Outlook 2007 - How do I deploy custom toolbar and macro code?

Just wondering, do I really have to use Visual Studio to create a simple add-in/toolbar in Outlook 2007? I created a simple toolbar with a button that opens a form. Then I created some macro code in there and run it clicking the button. But now I want to save this thing and deploy it on other computers. How do I do such a thing? ...

Excel 2007 shadow copy ?!

Hello, my question is about Excel addins and vba code. This is the situation: There are 2 Excel files. One is just a normal Excel sheet, one is a .xla addin which is stored on a network drive. In the .xla file I have the Vba code. In the normal Excel sheet is a reference to the .xla file so that the sheet can use the macros from the...

Can I define variadic C preprocessor macros with __VA_ARGS in the middle instead of the end?

GCC complains if i do this: #define M(obj,met, ..., contents) obj##_##met(const void * self, __VA_ARGS__) { \ contents \ } Giving me these 2 reasons: error: missing ')' in macro parameter list warning: __VA_ARGS__ can only appear in the expansion of a C99 variadic macro Apparently, C99 - style variadic macros expect the clos...

Convert to Text Format In Excel

Hi, I'm extracting some data from AS400 using excel macro. In the AS400, this particular column (Ref), shows 20100729000078154 but when I extracted it to excel, it will be 2.01007E+16. I need to hv 20100729000078154 as my final output. This is the macro that I used to extract the info from AS400 :- Sub Extract() Dim StrSQl As String ...

Recommended macros to add functionality to Clojure's defrecord constructor?

defrecord in clojure allows for defining simple data containers with custom fields. e.g. user=> (defrecord Book [author title ISBN]) user.Book The minimal constructor that results takes only positional arguments with no additional functionality such as defaulting of fields, field validation etc. user=> (Book. "J.R.R Tolkien" "The L...

Why does let require a vector?

I never really thought about this until I was explaining some clojure code to a coworker who wasn't familiar with clojure. I was explaining let to him when he asked why you use a vector to declare the bindings rather than a list. I didn't really have an answer for him. But the language does restrict you from using lists: => (let (x 1...

Find certain value in excel and add entire row below it using Vbscript

What i'd like to do, is write a VB macro that will scan the entire column (Column F) searing for "Year Total:" and then insert an entire row below it. I have this: Sub Macro2() ' ' Macro2 Macro ' ' Keyboard Shortcut: Ctrl+a Dim C As Variant Dim FirstRow As Integer With Worksheets(1).Range("F1:F4000") Set C = .Find("Year Total:", ...

How to add tabs to PowerPoint 2010 that call macros

I have created a pptm file with macros that open certain pptx templates. I then created a new tab with buttons for opening the files. I attached the macros I created to those buttons. All works great as long at my pptm file is open. But after I save it as a ppam file and install it as an add-in it no longer works. It seems the macro...

defmacro with defclass

Hi, I have a class in Common Lisp: (defclass my-cool-class() ((variable1 :initarg :variable1 :accessor variable1 :initform (error "Must supply value to variable1")) (variable2 :initarg :variable2 :accessor variable2 :initform (error "Must supply value to variable2")) I wanted to create a macro that would ...