Most voted "macro" questions
91 questions
Sort by count of
-
38
votes2
answers1031
viewsWhy use "while(0)"?
In Linux code I saw some macros with: do { }while(0) Is there a reason? Because there seems to be no logic in a repeat loop where the code repeats only once.
-
11
votes1
answer143
viewsWhat does " " mean in the header of C++?
I was looking at the MFC header and I don’t know what the character " " means in this context: #define BEGIN_MESSAGE_MAP(theClass, baseClass) \ PTM_WARNING_DISABLE \
-
7
votes1
answer2796
viewsWhat are Macros and how to use them?
So far during my C programming course, the only contact I had with macros came from standard libraries and not really knowing what was going on when calling these macros. I would like to know…
-
6
votes1
answer901
viewsVBA Download pdf
I am developing a macro in excel that through a list of id and passwords in excel logs into a website and tries to download a pdf. I can log into the site and navigate to the button that generates…
-
6
votes1
answer6469
viewsMacro email range + signature
Good morning. I need help in a macro for sending emails in Outlook 2007. I have a macro that selects a certain range of cells (all right and all down from a referenced cell) and pastes in an email,…
-
5
votes2
answers661
viewsWhere to create macros in C?
In terms of good programming practices, if I want to create a macro, for example, a macro that has about 30 lines of code, I should implement it in the archive .c or in the .h? What is good…
-
5
votes1
answer3351
viewsMACRO in Excel - printing with sequential numbers
I have a macro from a few years ago that still works, when I click to print the production orders of my company, I put the start and end number, and the macro prints the Ops with the numbers in…
-
5
votes1
answer1929
viewsImacro how to restart or continue the script
I have used the immaculate in these sites of bicoins, and it works perfectly the process. however it is not 100%. I need a code to put at the end of the script process that makes it search the word…
-
4
votes1
answer69
viewsHow to see the value of a define or macro in gdb?
I have the following line of code: int a = MAX(b,c); How to verify macro definition MAX(b,c)? Sometimes, the same macro is defined in several different ways in a code (for example, depending on the…
-
4
votes1
answer240
viewsWhy are there so many parentheses in macro?
Seeing this, it intrigues because it needs those parentheses that seem unnecessary. What is their functionality? #define SUB(x, y) ((x) * (y))
-
4
votes1
answer2800
viewsMacro to automatically search images and play in excel
Good afternoon, I have a spreadsheet, where I need to automatically include images. I wonder if there is any way to elaborate a macro, where you join the Reference and color (reference & color)…
-
4
votes1
answer142
viewsWhat are the differences between macros and constexpr? When is it preferable to use one instead of the other?
I haven’t been in touch with C++, until I decided to create a project to test a solution. As I knew before, I created a macro to use a value as "constant" later, example: #define MAX_ENTRIES = 10…
-
3
votes2
answers1138
viewsHow to delete line with information after a blank line in the middle?
I’m running a macro to import txt data. But this macro is bringing the information down after a white line (9 Rows(s) affected) The data information is correct, but it has this line that I need the…
-
3
votes1
answer1180
viewsHow to use scan for a numeric variable [SAS]
I have a table like this: Lista_id 1 4 7 10 (In total are 100 numbers) I want to call them to a macro that I created. I was trying to do it with Scan, but I read that it was only for text variables.…
-
3
votes1
answer451
viewsHow to delete/delete repeat lines by comparing different cells?
I want to know how to delete a row that is repeat along my table. The image below can help Possible solutions: 1. Browse with Macro from file Excel1 this pass the dice to the file Excel2. Prevent it…
-
3
votes2
answers1314
viewsAutofill - How to select the second line
Guys, I got the following problem: I’m filling a cell with a formula and I need it to be duplicated for the others. So I’m using the code Selection.AutoFill Destination:=Range("C2:C329") Problem:…
-
3
votes2
answers54
viewsWhat does the # operator do before a parameter in the definition of a macro?
One of the possible macro definitions assert(), as I found in Mingw’s code,. #define assert(_Expression) \ (void) \ ((!!(_Expression)) || \ (_assert(#_Expression,__FILE__,__LINE__),0)) I don’t…
-
2
votes1
answer647
viewsRead and write xlsm file in php
I have a very big hand problem: I have an xlsm file with macros to read, write and finally download. It is a 4 MB file with inline formatting and images. I’ve been using Phpexcel only I haven’t been…
-
2
votes3
answers888
viewsRange in Excel VBA
I have the following code snippet: ActiveSheet.QueryTables.Add(Connection:= _ "TEXT;C:\Users\Contoso\Desktop\ArquivosDoContoso.csv", Destination:=Range _ ("$A$1")) In part Destination:=Range _…
-
2
votes1
answer630
views -
2
votes1
answer1121
viewsCan a macro create another macro?
I have a spreadsheet of analysts, but when you change the analyst or enter a new one I need to copy everything the same as the other analysts just by changing his name. I wanted to know if there is…
-
2
votes1
answer114
viewsConsolidate macros
I need to create a macro that allows me to choose all . xml files and import them into excel. At the moment the process is as follows: - I open the first one manually and then call the macro that…
-
2
votes1
answer3446
viewsHow to import data from internet to excel vba
I’m trying to download a table from the site: "http://www.scoutscartola.com/mercado", and I already "got". But there is a problem in my code. I want the user to define the team. This is done by…
-
2
votes1
answer6622
viewsMacro VBA for inserting images automatically based on a column of codes
Good afternoon, I have a spreadsheet, in which there is a column with the code of the photos and in the other column beside with spaces to insert the images. I wonder if there is any way to…
-
2
votes1
answer340
viewsCombobox does not update and accepts wrong values
Good, I have this code for a combobox, and I have two problems. First: I can’t get the combobox to accept only the list values Second: the listing has only one value Private Sub TempCombo_Change()…
-
2
votes1
answer2559
viewsLimit characters and character type
I need some help. I have a spreadsheet this way: And I want to limit the amount of characters and the type In the segment column I want to limit it to 6 characters if it is less than 6 or more than…
-
1
votes2
answers1065
viewsVBA Control of hours/employees
I’ve been trying for days to learn the commands in VBA to automate a company’s employee hours control spreadsheet. I have a sheet with the names of the employees and a calendar as follows: horas…
-
1
votes0
answers626
viewsWhat to do to decrease the processing of Memoria RAM in VBA?
I am making a spreadsheet, and whenever I run my macros it starts to crash, I saw how much of Ram ta using and ta 1.6GB and the file each time it saves increases significantly in size, now it is…
-
1
votes1
answer5403
viewsMacro to exclude filtered table row
I created a table with data from an account balance and I am doing a macro to select only a few values. An assignment of the macro would be to filter in one of the columns all zeroed values so as to…
-
1
votes1
answer1011
viewsProblem importing text file via VBA
I am trying to import a text file to excel through the following macro: Sub Teste() Dim intervalo As String intervalo = "intervalo" Workbooks.Add ActiveWorkbook.Sheets("Plan1").Select With…
-
1
votes1
answer190
viewsWrite dates (month/year) between two dates
Hello, I have two dates: Initial Before Jan-11 Oct-10 Feb-11 Sep-10 I would like to know how I can have a macro that writes the date between them adding these dates in two new lines and look in the…
-
1
votes1
answer726
viewsHow to use getElementsByClassName on an Internet Explorer object in VB.Net?
I’m trying to use a getElementsByClassName in an Access macro. You are showing line error: If ie.Document.GetElementsByClassName("msgErroAdic").Length > 1 Then Being Dim ie as Object and Set ie =…
-
1
votes1
answer679
viewsCopy columns from matching rows
I have a spreadsheet containing 100 rows with country names and 12 columns (months of the year) containing values. My need is to compose a macro that: sweep the columns and copy to another…
-
1
votes1
answer1532
viewsVBA - Copy and paste data without column sequence to rows
Hello ! I have a spreadsheet with two tabs: In PLAN1 I have a single column with several data, but they do not follow a sequence. The values that can be found in this column are: Product code (Ex:…
-
1
votes1
answer1252
viewsMacro Vba - IE... Click, Not Working button
I can’t click a button that generates an Excel report (then it opens that "File Download" button "Want to save? Open? Cancel? but this part is quiet, I think, if it’s not let me know and if you…
-
1
votes2
answers1488
viewsChronologically order VBA date and time
Good afternoon, I would like to know how I do to sort by date and time by excel. It would be 1 hour column and another date column. Oh my doubt is how I order the schedules chronologically without…
-
1
votes0
answers21
viewsHow to automatically convert a formula to number in Sheets?
Which Google Sheets script is able to turn a formula into a number (as if to copy the formula and paste "only values").
-
1
votes1
answer1003
viewsHow to close an alert in IE in with VBA
I have an Excel macro that connects to a local tool and extracts the information. Basically I take a report according to the user. I have a column with users, however if the user does not present…
-
1
votes0
answers99
viewsPopup Preventing Macro from Advancing
I have a macro that enters a particular site, fills in a form, and sends a save for the system, generates a request. After that, a popup is issued with a button "OK". This ok has a eventClick that…
-
1
votes1
answer30
viewsProblem with macro
I’m trying to solve the following exercise: Write a program that defines and uses the PRINTARRAY macro to print an integer array. The macro should receive the array and the number of elements in the…
-
1
votes2
answers119
viewsMACRO to insert image with respect to drop-down list
Good morning, everyone, I’m having a doubt I don’t know if it’s frivolous or not: I have a field (the large rectangle) of which I want to insert an image inside it, according to the selected…
-
1
votes1
answer131
viewsSpecify last line to fill in form - VBA
I am making a form and I want the person to register only 6x (only 6 lines) the content. How to limit this amount ? As an example above, I put the rows and columns and when I fill in the form, new…
-
1
votes1
answer81
viewsVBA Add "-" every two characters to form MAC Address
I would like to form a MAC address from the data collected from a barcode reader. I need every two characters to be added one "-". Entry text: A9B8C7D6E5F4 Output text: A9-B8-C7-D6-E5-F4 So far I…
-
1
votes0
answers71
viewsVBA Getobject using variable in Windows 10 registry Swing Project
Hello. I have a problem with a component here in the company. The application is built in Swing with java 6. We use a framework called Jintegra. We have a feature where the user clicks on the button…
-
0
votes1
answer490
viewshow to repeat this iimplay command non-stop
iimPlay ("Pixel Coin Bot.iim"); iimPlay ("claim.iim"); iimPlay ("wait.iim"); I have this command but I want it to run this 3 macros non-stop how to do this.
-
0
votes1
answer314
viewsMacro Excel capture link redirects
It is possible to create a macro that copies the redirects I have on links in cells A1:A100 ? For example in the cell A1 have www.pplware.com, but when we open this url I am redirected to another…
-
0
votes0
answers241
viewsTabulation in excel
Hello I have a spreadsheet with some data on imports from the IRS. On this worksheet I do a tabulation of data, based on one of the columns that comes in this worksheet called "product description",…
-
0
votes2
answers429
viewsDoes Excel convert Macro into formula?
Without using the macro editor in VB it is possible to use a simple macro line in a formula? I want to get a value of a cell always from the tab to the left of the active tab, as this could be done…
-
0
votes0
answers214
viewsVBA integration with IE, return Value where Value=""
I have a problem in a macro to return me the value of a web page, my doubt is established by the value shown in the HTML code is always null, but in the reply box gives me the requested value. Even…
-
0
votes2
answers1621
viewsPass values from one form to another
Expensive I have two A and B forms. A = Has listview and displays base information B = Need to receive form A information and display. (Information that is not displayed in form A) I need to make it…