Search Results

Search found 1127 results on 46 pages for 'macro'.

Page 6/46 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Starting Off VBA Macro With C# - Password Grief

    - by ChloeRadshaw
    I am stuck - I have a macro in a workbook which I can call quite easily using the run method on MSDN The problem is that if the workbook has a password protecting the code then this becomes much more difficult and forces a dialog box to appear.. Does anyone know how to run a macro from C# which has a password on it??

    Read the article

  • How to use the ListView_GetBkImage macro in C#

    - by MusiGenesis
    How can I use the ListView_GetBkImage macro: http://msdn.microsoft.com/en-us/library/bb761246(v=VS.85).aspx ... from a C#/WinForms application? I think this macro just wraps the SendMessage method, but I'm not sure. I couldn't find any C#-based samples on this. Basically I'm trying to get a LVBKIMAGE ( http://msdn.microsoft.com/en-us/library/bb774742(v=VS.85).aspx ) structure that references the Desktop's background bitmap.

    Read the article

  • How to use 5 byte value in macro

    - by shaktisinha
    Hi All, I've just started reading C and have a question about macro. How can I use a 5 byte value with a macro For eg. #define MAX 0xdeadbeaf12 int main(){ printf(" 0x %2x \n", MAX); } This code prints adbeaf12 but not deadbeaf12. Please help. Thanks

    Read the article

  • Have macro 'return' a value

    - by bobobobo
    I'm using a macro and I think it works fine - #define CStrNullLastNL(str) {char* nl=strrchr(str,'\n'); if(nl){*nl=0;}} So it works to zero out the last newline in a string, really its used to chop off the linebreak when it gets left on by fgets. So, I'm wondering if I can "return" a value from the macro, so it can be called like func( CStrNullLastNL( cstr ) ) ; Or will I have to write a function

    Read the article

  • How to understand such C macro expansion

    - by upton
    A macro definition: #define HTTP_ERRNO_MAP(XX) \ /* No error */ \ XX(OK, "success") \ \ /* Callback-related errors */ \ XX(CB_message_begin, "the on_message_begin callback failed") \ XX(CB_url, "the on_url callback failed") \ /* Define HPE_* values for each errno value above */ #define HTTP_ERRNO_GEN(n, s) HPE_##n, enum http_errno { HTTP_ERRNO_MAP(HTTP_ERRNO_GEN) }; #undef HTTP_ERRNO_GEN After expand it by "gcc -E", enum http_errno { HPE_OK, HPE_CB_message_begin, HPE_CB_url,}; How does the macro expand to the result?

    Read the article

  • Outlook plugin/macro - "Got the wrong bob"

    - by tumchaaditya
    I want to develop a feature in outlook similar to 'Got the wrong bob' feature in Gmail. I want my plugin/macro to check the addressees when I hit send and want to alert me if I have included wrong person. I need some ideas about how can I build the logic for this feature? Or how should I go about it? If such plugin is already there then even better.. P.S.: I have already checked SendGuard and it is not of much use in this case.

    Read the article

  • Removing an OTF macro from a Razer Deathstalker

    - by Herpeslurpee
    I recently bought a Razer Deathstalker, and the other day I managed to activate the OTF macro recorder by accident, so now I have random gibberish and key presses bound to regular keys, so typing anything ends up being a pain, considering the backspace key prints "allallallallall", and so on. The only way I've found of fixing this is reconnecting the keyboard or disabling Synapse, but that's only temporary, as it comes right back the next time I turn my PC on. Razer support mentions nothing related to removing them, and neither anywhere else I could imagine, and nothing shows up in Synapse (god I hate Synapse). But anyways, I'd appreciate it if anyone could help. Thanks

    Read the article

  • Macro to manage sport ranking and calendar?

    - by Ale
    I need to write a macro to manage ranking and calendar for curling turnament. The event will follow the Shenkel system first match determined by general draw after that every team has played one match is possible to determine the first ranking second match determined by the rule: 1st vs. 2nd - 3rd vs. 4th - 5th vs. 6th and so on after that every team has played two matches is possible to determine the second ranking and so on until the end (3 to 5 matches normally). Another rule is that from the second match is not possible to play against a team that I played before! I was thinking to use MS-excel but also Calc (both LibreOffice/OpenOffice) should be fine. Thanks in advanced

    Read the article

  • Filling cells with sequential numbers in an Excel (2003) macro

    - by Fred Hamilton
    I need to fill an excel column with a sequential series, in this case from -500 to 1000. I've got a macro to do it, but it takes a lot of lines for something that seems like it should be a single function [something like FillRange(A2:A1502, -500, 1000, 1)]. But if that function exists, I can't find it. Is the following as simple and elegant as it gets? 'Draw X axis scale Cells(1, 1).Value = "mV" Cells(2, 1).Value = -500 Cells(3, 1).Value = -499 Cells(4, 1).Value = -498 Dim selection1 As Range, selection2 As Range Set selection1 = Sheet1.Range("A2:A4") Set selection2 = Sheet1.Range("A2:A1502") selection1.AutoFill Destination:=selection2

    Read the article

  • MS Excel find and replace macro

    - by william
    I have written a macro to remove special characters in a sheet based on ascii values but the problem with it is that it is replacing the cell content. For example p;j;h which should become p,j,h is becoming ,, (missing the data). Do I need to include any additional statements, or how else to adjust my code? sub specialcharecters() Dim i As Long For i = 32 To 43 Selection.Replace what:=Chr(i), replacement:=", ", LookAt:=xlPart, SearchOrder:= _ xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False Next i Selection.Replace what:="~*", replacement:=", ", LookAt:=xlPart, SearchOrder:= _ xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False For i = 45 To 47 Selection.Replace what:=Chr(i), replacement:=", ", LookAt:=xlPart, SearchOrder:= _ xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False Next i For i = 58 To 64 Selection.Replace what:=Chr(i), replacement:=", ", LookAt:=xlPart, SearchOrder:= _ xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False Next i For i = 123 To 125 Selection.Replace what:=Chr(i), replacement:=", ", LookAt:=xlPart, SearchOrder:= _ xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False Next i Selection.Replace what:="~~", replacement:=", ", LookAt:=xlPart, SearchOrder:= _ xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False END sub

    Read the article

  • word 2010 Macro to name and Save file when opened

    - by Phillip Clark
    I have a word document template and will be using a hyper link in Excel to access the word file. The issue I need to resolve is making sure once it is opened a message field box is "popped" up asking the user to create a new file name ... (in this case the current date) for each time the file is opened. In the message pop when finished entering in file name they click yes and then the save screen comes up with the path/file type (macro enabled document) and the file name they have already entered in the pop up.. All they should have to do from the save screen is click ok and it saves the file to a certain path/folder on the C drive of the computer. Once they finish typing in their notes they click a active x button to save and close and they are finished. If anyone can help with this it would be fantastic.

    Read the article

  • MS Excel Vba/Macro equivalent in LibreCalc or OpenOfficeCalc

    - by ReggieCL
    is there an equivalent macro/vba in libre calc that does this routine; - Read/open xls files in a path and do a batch import/copy of read sheets and merge it with the current open workbook. Here's the vba I used in MS Excel. Thanks in advance Sub Consolidate_Sheets() 'Folder Path to read the xlsx files from Path = "F:\WIP2\Below 25\" filename = Dir(Path & "*.xlsx") Do While filename <> "" Workbooks.Open filename:=Path & filename, ReadOnly:=True For Each sheet In ActiveWorkbook.Sheets 'import/copy sheets from to read xlsx files sheet.Copy After:=ThisWorkbook.Sheets(1) Next sheet Workbooks(filename).Close filename = Dir() Loop End Sub

    Read the article

  • Macro - maintain paste link if new row is added to master spreadsheet

    - by Ross McLaughlin
    I have a master spreadsheet that has a portion of data (say columns a to e) that paste links to a report. Each row paste links to its own report. If I add a new row to the master spreadsheet I now have the wrong data linking into my reports. I know if I have the reports open when a change is made to the master it will update the reports. However, with the number of reports I will soon have this will no longer be practical. Is there a macro or formula that can be added to maintain the correct data link. I have no real knowledge on such matters and as much information as possible would be greatly appreciated. Many thanks in advance.

    Read the article

  • Textwrangler (OS X) -- Simple Text Macro Help Needed

    - by bobber205
    I often, when parsing log/error files, need to replace < and < and > with in order to be able to efficiently understand what's going on in the files. I know TextWrangler has a macro ability but I can't figure out a efficient way to do this. Since I have to do it so often I'd love to just have a simple keybinding or menu item to do this simple replace/find all for me. Anyone know how to do this? ^_^

    Read the article

  • Excel macro to delete empty rows isn't stopping

    - by RocketGoal
    How do I make it stop after a certain amount of rows? I've taken a VBA course and my teacher explained how to delete empty rows. I'm now trying to put this in place but my macro isn't stopping. I thought I had limited it to 200 rows. I'm missing something important. Any pointers much appreciated. Sub RemoveRows() ' Remove rows from last blank cell Dim LastRow As Long Dim ISEmpty As Long 'Count how many records in the list. This is done so that the Do loop has a finish point. LastRow = Range("A200").End(xlUp).Row 'Start at the top of the list Range("A1").Select 'Loop until the end of the list Do While ActiveCell.Row < LastRow 'Assign number of non empty cells in the row ISEmpty = Application.CountA(ActiveCell.EntireRow) 'If ISEmpty = 0 then delete the row, if not move down a cell into the next row If ISEmpty = 0 Then ActiveCell.EntireRow.Delete Else ActiveCell.Offset(1, 0).Select End If Loop End Sub

    Read the article

  • Macro to copy values to new sheet and prompt user where they want to save

    - by MasterJedi
    I'm looking to create a macro in Excel 2007 which will do the following: copy the formatting and values from a sheet called 'report', insert this into a new workbook, naming the file with the value in 'B9' and appending the word 'report' to this when copying the data into a new workbook, the formatting of the original should be retained, but cell contents pasted as values rather than formulas prior to saving the file with the above name, the user will be prompted to choose their folder at the end, a message will be displayed alerting the user that the file has been saved successfully Any assistance would be much appreciated. Thanks. I have attempted to do this, but my experience with VBA is limited. Here is what I have done so far... Application.DisplayAlerts = False Worksheets("Report").Copy With ActiveSheet.UsedRange .Value = .Value End With ActiveSheet.DrawingObjects.Delete Set wbNew = ActiveWorkbook wbNew.SaveAs Application.GetSaveAsFilename wbNew.Close True Application.DisplayAlerts = True

    Read the article

  • Resharper Live Template Macro that changes variable name upon exit

    - by Luhmann
    I would like to create a Resharper Live Template that changes all spaces to underscores ind my "fact" Live template variable $testname$: <Fact()> _ Public Sub $testnames$() ' Arrange $END$ ' Act ' Assert End Sub I have this: [Macro("applyRegex", ShortDescription = "Run on {#0:variable}", LongDescription = "")] class ApplyRegexMacro : IMacro { public string EvaluateQuickResult(IHotspotContext context, IList<string> arguments) { return Regex.Replace(arguments[0], " ", "_", RegexOptions.IgnoreCase); } public HotspotItems GetLookupItems(IHotspotContext context, IList<string> arguments) { return null; } public string GetPlaceholder() { return "placeholder"; } public bool HandleExpansion(IHotspotContext context, IList<string> arguments) { return false; } public ParameterInfo[] Parameters { get { return new[] { new ParameterInfo(ParameterType.String), new ParameterInfo(ParameterType.String), new ParameterInfo(ParameterType.VariableReference) }; } } } But this only runs when i press tab. I want the macro to run after I tab out of $testname$. I want to be able to just write the test name in a single line of text with spaces, and then the Macro turns all the spaces into underscores. Is this possible?

    Read the article

  • SOLVED: Lisp: macro calling a function works in interpreter, fails in compiler (SBCL + CMUCL)

    - by ttsiodras
    As suggested in a macro-related question I recently posted to SO, I coded a macro called "fast" via a call to a function (here is the standalone code in pastebin): (defun main () (progn (format t "~A~%" (+ 1 2 (* 3 4) (+ 5 (- 8 6)))) (format t "~A~%" (fast (+ 1 2 (* 3 4) (+ 5 (- 8 6))))))) This works in the REPL, under both SBCL and CMUCL: $ sbcl This is SBCL 1.0.52, an implementation of ANSI Common Lisp. ... * (load "bug.cl") 22 22 $ Unfortunately, however, the code no longer compiles: $ sbcl This is SBCL 1.0.52, an implementation of ANSI Common Lisp. ... * (compile-file "bug.cl") ... ; during macroexpansion of (FAST (+ 1 2 ...)). Use *BREAK-ON-SIGNALS* to ; intercept: ; ; The function COMMON-LISP-USER::CLONE is undefined. So it seems that by having my macro "fast" call functions ("clone","operation-p") at compile-time, I trigger issues in Lisp compilers (verified in both CMUCL and SBCL). Any ideas on what I am doing wrong and/or how to fix this?

    Read the article

  • exec() in BeanShell macro causes jEdit to hang when it returns non-zero exit code

    - by rossmeissl
    I have a jEdit BeanShell macro that runs my Markdown files through Maruku when I save them: if (buffer.getMode().toString().equals("markdown")) { cmd = "C:\\Ruby\\bin\\maruku.bat -o " + buffer.getDirectory() + buffer.getName().replaceAll("markdown$", "html") + " " + buffer.getPath(); exec(cmd); } This works great when the Markdown file is valid. But if I've made a mistake, jEdit just waits around forever for the exec() call to "succeed," which it never will. When this happens, I have to kill jEdit's javaw.exe process and run Maruku manually from the command line to discover the error, e.g.: E:\bp\plan\supply_chain>maruku business_plan.markdown ___________________________________________________________________________ | Maruku tells you: +--------------------------------------------------------------------------- | Could not find ref_id = "17" for md_link(["17"],"17") | Available refs are [] +--------------------------------------------------------------------------- !C:/Ruby/lib/ruby/gems/1.8/gems/maruku-0.6.0/lib/maruku/errors_management.rb:49:in `maruku_error' !C:/Ruby/lib/ruby/gems/1.8/gems/maruku-0.6.0/lib/maruku/output/to_html.rb:716:in `to_html_link' !C:/Ruby/lib/ruby/gems/1.8/gems/maruku-0.6.0/lib/maruku/output/to_html.rb:970:in `send' !C:/Ruby/lib/ruby/gems/1.8/gems/maruku-0.6.0/lib/maruku/output/to_html.rb:970:in `array_to_html' !C:/Ruby/lib/ruby/gems/1.8/gems/maruku-0.6.0/lib/maruku/output/to_html.rb:961:in `each' \___________________________________________________________________________ Not creating a link for ref_id = "17". Then I restart jEdit, fix the error, and re-save the file, at which point the macro succeeds. How can I make my macro more resilient to either die helpfully (display Maruku's error output) or, at the very least, die silently so I don't have to kill jEdit?

    Read the article

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

    - by Patricker
    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/answers/hints into a SQL Database. I've worked with Office.Interop before when working with Excel and Word and I have plenty of SQL DB experience, so I don't foresee any issues with actually extracting the text portion of the question and answer and putting it into the db. What I have no idea how to do is given an object on a slide - get the action button info - Get the macro name - and finally get the macro's vb code. From there I can figure out how to parse out which is the correct answer and what the text of the hint is. Any help/ideas would be greatly appreciated. The guy I'm doing this for said he is willing to do it by hand... but that would take a while.

    Read the article

  • Macro to improve callback registration readability

    - by Warren Seine
    I'm trying to write a macro to make a specific usage of callbacks in C++ easier. All my callbacks are member functions and will take this as first argument and a second one whose type inherits from a common base class. The usual way to go is: register_callback(boost::bind(&my_class::member_function, this, _1)); I'd love to write: register_callback(HANDLER(member_function)); Note that it will always be used within the same class. Even if typeof is considered as a bad practice, it sounds like a pretty solution to the lack of __class__ macro to get the current class name. The following code works: typedef typeof(*this) CLASS; boost::bind(& CLASS :: member_function, this, _1)(my_argument); but I can't use this code in a macro which will be given as argument to register_callback. I've tried: #define HANDLER(FUN) \ boost::bind(& typeof(*this) :: member_function, this, _1); which doesn't work for reasons I don't understand. Quoting GCC documentation: A typeof-construct can be used anywhere a typedef name could be used. My compiler is GCC 4.4, and even if I'd prefer something standard, GCC-specific solutions are accepted.

    Read the article

  • Macro and array crossing

    - by Thomas
    I am having a problem with a lisp macro. I would like to create a macro which generate a switch case according to an array. Here is the code to generate the switch-case: (defun split-elem(val) `(,(car val) ',(cdr val))) (defmacro generate-switch-case (var opts) `(case ,var ,(mapcar #'split-elem opts))) I can use it with a code like this: (generate-switch-case onevar ((a . A) (b . B))) But when I try to do something like this: (defparameter *operators* '((+ . OPERATOR-PLUS) (- . OPERATOR-MINUS) (/ . OPERATOR-DIVIDE) (= . OPERATOR-EQUAL) (* . OPERATOR-MULT))) (defmacro tokenize (data ops) (let ((sym (string->list data))) (mapcan (lambda (x) (generate-switch-case x ops)) sym))) (tokenize data *operators*) I got this error: *** - MAPCAR: A proper list must not end with OPS. But I don't understand why. When I print the type of ops I get SYMBOL I was expecting CONS, is it related? Also, for my function tokenize how many times the lambda is evaluated (or the macro expanded)?

    Read the article

  • runtime error "out of memory"+excel macro

    - by user356180
    hi experts. i have one macro,which i called when cell change. this macro select images and delete them and insert another image depending on cell value using following code. i have same code for two sheets. Private Sub Worksheet_SelectionChange(ByVal Target As Range) ActiveSheet.Shapes.SelectAll Selection.Delete 'insert image code here. End Sub in one sheet its working perfectly fine and delete all images while in other sheet , it give me runtime error "out of memory" and highlight following line. ActiveSheet.Shapes.SelectAll can any one tell me why this is happening? it works perfectly fine in one and not in other. one other thing i want to tell you is. it was working fine when i gave this macro excel to my client,both sheets were working fine, suddenly after 2 days, he started getting error on one sheet on which he was working lot. dont know why this is happening. can anyone tell me whats reason and how to solved it?

    Read the article

  • Runtime Error: "Out of Memory" From Excel Macro

    - by user356180
    I have one macro, which is called when a cell change occurs. This macro selects images, deletes them, and inserts another image depending on a cell value using the following code. I have the same code for two sheets. Private Sub Worksheet_SelectionChange(ByVal Target As Range) ActiveSheet.Shapes.SelectAll Selection.Delete 'insert image code here. End Sub In one sheet, it's working perfectly fine and deletes all images, while in the other sheet, it gives me the runtime error "Out of Memory" and highlights the following line: ActiveSheet.Shapes.SelectAll Can anyone tell me why this is happening? It works perfectly fine in one and not in the other. One other thing I want to tell you is it was working fine when I gave this Excel macro to my client; both sheets were working fine. Suddenly after 2 days, he started getting the error on one sheet on which he was working a lot. I don't know why this is happening. Can anyone tell me what's the reason for this and how I can solve it?

    Read the article

  • Distributing Microsoft Office Template or Macro over the network

    - by zfranciscus
    We have around 400 users who use Word and we want to make their life easier by distributing templates and macros over the network. The easiest way to do this of course to setup a shared network folder and let them get the appropriate templates and macros. Of course, each user has to know where to copy these files to in their local PC, and we have to rely on constant email communication to let them know for newer version of the macro and templates. The next alternative is to ask them to configure Word to point to these network folder. But of course any disruption to the network means disruption to their work. We are thinking to setup a synchronization mechanism that downloads new templates to their local machine. We are also thinking to make this sync tool to prompt users that it will download new templates - you know just to give them visibility that they are receiving changes. We are wondering what is the best approach that people usually use in their workplaces ? Are there any specific tool that can make this task easier ?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >