Member Avatar

Hi Group, I've recreated a spreadsheet that has multiple macro's behind it. One of these macro's opens and existing file, copies the data in it and then pastes it into the original workbook (where the macro's originate) and then closes the existing file. After the copy and paste is done, this original worksheet (for some unknown reason) is being saved as a new file (that name is "89.123456"). For the life of me, I can't figure out why. Here's the code that runs this: Option Explicit Dim strategyName As String Dim docName As String Dim priceOptName As String Dim folderName …

Member Avatar
0
20
Member Avatar

Hi Group, I've written a macro to save a copy of the spreadsheet at the end of each day. I tried to test it as a shared file and learned the macro wouldn't work. Is this normal for a shared document? If so, is there a way around this? How can I do this? In advance, thanks for your help. Don

Member Avatar
0
14
Member Avatar

**note:** This was also posted to the [comp.lang.scheme](https://groups.google.com/forum/#!forum/comp.lang.scheme) earlier today. I normally wouldn't cross-post, but after I noticed the extremely low traffic on the newsgroup, I decided to try a more active, if less specialized, forum. As part of a larger project, I am writing a macro that defines a variable and binds it to a list of pairs, where most of the pairs map a pattern and a value. Each pattern is a list, which may have a combination of symbols and strings. I am something of a novice with (define-syntax), and have struggled to get this to where …

Member Avatar
0
21
Member Avatar

I want to put the path and name of a spreadsheet, the page and number of pages and the date and time into the footer(s) and display it in Times New Roman 6 pts. I made the following macro: Range("A1").Select ActiveWindow.View = xlPageLayoutView` Application.PrintCommunication = False With ActiveSheet.PageSetup .LeftFooter = _ "&""Times New Roman,Standaard""&6 &Z&F" .CenterFooter = _ "&""Times New Roman,Standaard""&6 Page &P of &N" .RightFooter = _ "&""Times New Roman,Standaard""&6 &D &T" End With Application.PrintCommunication = True ActiveWindow.View = xlNormalView Range("A1").Select When I start the macro only a part of the centerfooter is filled. When I start the same …

Member Avatar
0
14
Member Avatar

I copied a list into Excel and some of the list formatted into the neihgboring columns instead of lining up in the list. I need to get the items floating out in the columns back into the proper place in the list. I assume I need to somehow run a Macro to insert a row below each cell in columns B-ZZ that contain text, and then somehow copy/past the floating values to Column A in the appropriate new row. Is there a Macro that can help? See below for example of issue. A B C D .... ZZ item 1 …

Member Avatar
0
23
Member Avatar

How can i copy data from a named range in a different worksheet and paste it to another worksheet all done without activating both sheet. With all code just behind a form button If i try to use the statement **application.goto reference:="x"** where x is the named range but this activates the sheets if i try to use the statement **range("workbookname!x")** where x is the named range, i get an exception Anyone please?

Member Avatar
0
37
Member Avatar

currently I have a class function: class MyClass{ static int E(int A,int B, int C){ //function code } }; //and I call it like this : MyClass::E(1,2,3); //what I would like to do is call it in this way: E(1,2,3); //my current macro definition is this #define E(a,b,c) Myclass::E((a),(b),(c)) how do I correct my macro definition to generate the corect code?

Member Avatar
0
17
Member Avatar

My understanding of the C language is that the same identifier cannot be reused. However, the code below compiles on GCC without complaints, even when using the "-Wall -pedantic" flags. Is there something that I am missing? Does the standard say anything about functions/macros having the same name as typedef'd types? #include <stdio.h> typedef int error; #define init() error var_error = -6 #define error() ((const error)var_error) int main(void) { init(); printf("error() = %d\n", error()); return 0; }

Member Avatar
0
5
Member Avatar

I was wondering if there is any way using the mingw g++ compiler to make code that acts like this: [CODE]#define myLanguageBlock(X) doMyLanguageBlock(#X) void doMyLanguageBlock(const char* code){/*this executes the code as if it were in another language, I have already written this function*/} int main() { myLanguageBlock( this is all code written in my language. It has comma's, periods, and {brackets)][); return 0; }[/CODE] I am having trouble figuring this one out.

Member Avatar
0
16
Member Avatar

Hi. I'm sure this question has been asked before, but I can't get the text searched for. If anyone can explain them, refer me to an article, or give me the correct search query I would appreciate it. Thanks.

Member Avatar
0
5
Member Avatar

What is the fasted way to delete rows based on a condition in Column A using VBA? Anybody have an example? Thanks.

Member Avatar
0
2
Member Avatar

*sigh* I'm back again. Same program. Different problem. [CODE]private void executeToolStripMenuItem_Click(object sender, EventArgs e) { string aaa = String.Format(richTextBoxEditor.ToString()); /*<-- Guessing that this is redundant */ lua.DoString(aaa); //<-- problem code }[/CODE] When I attempt to execute the Lua code in the textbox, it crashes the program. Wat do?

Member Avatar
0
2
Member Avatar

I am trying to make a macro engine for a personal project, and it would work fine, except that the form won't show when I debug it. Take it for granted that I am using the LuaInterface DLL please. Code: [CODE]using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using LuaInterface; using System.Runtime.InteropServices; namespace Lua_Macroez { public partial class Form1 : Form { public Form1() { InitializeComponent(); lua.RegisterFunction("MoveMouse", formStuff, formStuff.GetType(). GetMethod("MoveMouse")); //Registers the mouse moving event lua.RegisterFunction("LeftCLick", formStuff, formStuff.GetType(). GetMethod("LeftClick")); } [DllImport("User32.dll", SetLastError = true)] public static extern int SendInput(int nInputs, ref INPUT …

Member Avatar
0
3
Member Avatar

Is there a macro that can get a text as input like "abc" and then extract characters in that text and generate a code using them, something like "{'a','b','c'}" ? thanks.

Member Avatar
0
5
Member Avatar

hi guys, can't understand why the answer of the following program is 7? Please explain.. [CODE]#include <stdio.h> #define SQ(x) x*x int main() { int a,b; a=5; b=-SQ(a+2); printf("%d",b); return 0; } [/CODE] thank you..

Member Avatar
0
8
Member Avatar

A couple days ago, I was involved in [URL="http://www.daniweb.com/forums/thread258996.html"]this thread[/URL] which concerns bit shifting (kind of) and a solution was found (by someone else). The problem is, something about the solution never really sat right with me. Hopefully someone can clarify this for me. [B]Code:[/B] The code uses 1 constant and 2 function-like macros defined thus: [code] /*part of solution by WaltP */ #define UINT_BITS ( CHAR_BIT * sizeof(unsigned int) ) #define rotateleft(x,n) ((x<<n) | (x>>(UINT_BITS-n))) #define rotateright(x,n) ((x>>n) | (x<<(UINT_BITS-n))) [/code] Ultimately the value of the UINT_BITS macro winds up being 32 (on most modern compilers) and the constant …

Member Avatar
0
7

The End.