Posts by Leo • 2,002 points
91 posts
-
1
votes2
answers758
viewsA: Values based on the last day of each month (Excel)
Diogo, sort it out like this: In the column F put the formula below for each row of your table =DATA(SE(MÊS(A1)=12;ANO(A1)+1;ANO(A1));SE(MÊS(A1)=12;1;MÊS(A1)+1);1)-1 She takes the month and year…
-
1
votes1
answer255
viewsA: Error opening exported excel file in PHP
Otácio, see this link: Autorun macros in Excel In your case, as Excel is running and so gives these messages, see if it is possible to resolve by autorunning a macro "before" your reading process is…
-
0
votes1
answer256
viewsA: How to remove a Label that was created dynamically in VBA?
Edelson, use the instruction below: Me.Controls.Remove Labels(0).Name Change the index to delete the desired label, in this case the index is zero. I usually delete from the last index until the…
-
0
votes2
answers85
viewsA: Calculate date with Javascript or otherwise, even in excel?
If this is what you need, I did in Excel, but since you were not specific, I considered only the days belonging to the last week of the year, and not seven days until 31 December inclusive. The…
-
1
votes2
answers1151
viewsA: How to compare database data and display to user
From what you presented, I believe you are looking for an answer that simplifies your process. So I’d do it this way: Create a single table with all possibilities but by height and weight range (I…
-
1
votes2
answers5251
viewsA: EXCEL FUNCTIONS FOR COMPARING VALUES
There is how to reduce formula and also how to treat possible errors. REDUCED FORMULA: Since with two conditions not met, the third is met, we have: =SE(Plan1!J2 > 4; "APROVADO"; SE(E(Plan1!J2…
-
1
votes3
answers5352
viewsA: How to convert from Text to Number via code to EXCEL in C#
You must be using Excel in Portuguese, but the data is processed originally in English, thus, 4.700,000000 is for Excel (as it is sending the data) equal to 4.7, because in English the symbol for…
-
6
votes3
answers1460
viewsA: Area of intersection of two polygons
As the link below, access master’s dissertation of Sergio Lifschitz which deals with it, and which I will use as an example to explain what you can do. Master’s dissertation - Sergio Lifschitz The…
-
0
votes2
answers204
viewsA: Pseudocode of an ATM that emits the smallest number of ballots possible
Igor, just check if the higher value of the ballot to be subtracted will give a negative value, if it does not, subtract, if it is negative, move to the next note of lower value. Thus: 377 - 100 =…
pseudocodeanswered Leo 2,002 -
10
votes6
answers6260
viewsA: How to determine if a number is power 2?
For this case just apply a single formula: Log Value / Log 2. If the result is a integer then Reported value is based on power of 2. MATHEMATICAL EXPLANATION We have to 2 to the power of x is equal…
-
7
votes1
answer2081
views -
4
votes1
answer482
viewsQ: How to treat unusual closing of a Combobox list in VBA?
I am creating an important effect for the presentation of a Combobox in particular. This Combobox is originally produced centralized, and when opening your list I make the text left-aligned so that…
-
3
votes1
answer950
viewsQ: Errors in using the Application.VBE object inside the VBA
In support of the solution of the question "How to inherit a VBA form?", executed the guidelines and examples of the site support.microsoft.com/en-us/kb/204330 for the purpose of dynamically…
-
2
votes1
answer5086
viewsA: How to "Copy and Paste" a VBA form?
There’s a way I’ve found to do, to test create a form and put a button on it only to check the copy later. To "copy", first, in the Project Explorer right-click on the name of the form you want to…
-
4
votes1
answer5086
viewsQ: How to "Copy and Paste" a VBA form?
I have a form ready that I want to take advantage of everything I did for him but in another form, it would be the case to do something similar to "Copy and Paste", has how to do?
-
2
votes0
answers156
viewsQ: How to inherit a VBA form?
I need to inherit a form in a VBA to use it as a basis for other forms. For example, a form called "Table" contains a list of two columns and buttons for 'Edit', 'Include' and 'Rule out' the items;…
-
1
votes2
answers71
viewsA: Do not modify cell for a given result.( History)
Victor, with the code below the corresponding cell of column B will only receive the updated value of column A if it (column A) does not contain the word "Finished". Dim i, Linha_inicial,…
-
0
votes2
answers140
viewsA: Excel - Reports
There are several ways to solve, I present a form without much sophistication, but that can be adapted to your need. The spreadsheet below shows an example of how to do. Column A = Your typed data,…
-
3
votes1
answer1348
viewsA: Auto run macros in Excel/VBA
I found the problem, the correct code is: Sub Workbook_Open() MsgBox ("Ok") End Sub In the examples were given various names with the event "Open", in my case only worked with "Workbook_open". You…
-
3
votes1
answer1348
viewsQ: Auto run macros in Excel/VBA
I made several attempts to execute a macro when starting Excel as indicated in the searches I did, although these indications are very simple, in my case did not work. I followed the following…
-
3
votes1
answer2178
viewsQ: Questions about executable program generation in VBA/Excel
I compiled a VBA program that interacts with an Excel spreadsheet. After having no more faults pointed out when compiling, the compilation is executed and no action is presented at the end. I did…
-
0
votes2
answers2421
viewsA: How to compare the values of one interval with another, following a formula?
Bruno, if I understood you, I’d do the following: In a cell you would use CONT.SE to know the total of completed laps, and compare this value with the number of laps. That’s it?…
-
1
votes1
answer69
viewsA: Copy record within the same table by changing some fields
Mauro, the IF line is with commands after THEN, that is, that IF ends on this same line, so the END IF below does not recognize this IF. To solve the problem, move the back of the THEN to the bottom…
-
0
votes2
answers763
viewsA: How to delete dynamically created objects based on vector? (VBA/Excel)
Evert, the solution presented only works within the same routine, when I created a separate routine to delete these objects, it didn’t work. I made several attempts and came up with a solution that…
-
1
votes1
answer810
viewsQ: Why do ASCII characters differ from Excel for presentation by code in VBA?
Does anyone know why this occurs? I need to use font characters "Wingdings 3" in Labels dynamically created in a form of VBA. If these Labels are created directly in the form the problem does not…
-
1
votes2
answers763
viewsQ: How to delete dynamically created objects based on vector? (VBA/Excel)
The code below creates Labels dynamically based on an array, occurs that I did not succeed in trying to eliminate (destroy) these objects. I tested 'Nothing' and other features indicated, but none…
-
1
votes2
answers1433
viewsA: Excel move un-duplicated values between two columns to a third
If I understand your problem, the code below does what you need. Make the necessary adaptations if you use columns other than "Z" or automatically take the number of the last row of the column, for…
-
1
votes2
answers1416
viewsA: How to create objects dynamically based on vector? (VBA/Excel)
It worked great! Below the suggested adaptation for my case (using vector). Grateful! Dim i As Integer Dim NewLabel(3) As Object For i = 0 To 3 Set NewLabel(i) = Me.Controls.Add("Forms.Label.1")…
-
1
votes2
answers1416
viewsQ: How to create objects dynamically based on vector? (VBA/Excel)
I created two Labels dynamically based on a vector according to the code below, however, in the form only remains the last Label created (Newlabel1), both the first (Newlabel0) and the Label I used…
-
1
votes1
answer10425
viewsQ: Save an image pasted in Excel spreadsheet through VBA
The code below copies a strip of cells of a spreadsheet that is pasted as image in another spreadsheet, but I did not find a way to save it as an image file in a folder, or even select it to work…
-
2
votes1
answer4284
viewsQ: Copy a range of Excel cells to an "image" object by VBA
I need to copy a track from an Excel spreadsheet that contains a graphic scheme made with borders around some cells, with some background colors and text, and view this scheme in a VBA "image"…
-
0
votes1
answer845
viewsA: Color Palette (VBA/Excel), "right mouse" event for Frame objects
SOLUTION I found the way to control the right mouse click under a frame (serves other objects as well). You must use the event Mousedown or Mouseup, for example (after creating the Frame1 on the…
-
1
votes1
answer443
viewsA: How to make a public routine for all forms without being tied to a form?
ERROR FOUND The error was by distraction, I was calling the routine with parentheses to put two arguments: Routine(a, b), Just take them out and it worked, even being the first call of…
-
0
votes1
answer443
viewsQ: How to make a public routine for all forms without being tied to a form?
I have several forms in my application, and I can start the call by some of them running partial for testing (not necessarily START from the main form). In addition to the public variables that are…
-
0
votes1
answer845
viewsQ: Color Palette (VBA/Excel), "right mouse" event for Frame objects
I found no reference to the event that is triggered by the right mouse button on a Frame object. With the event of the left mouse button select the desired color, this is working, however, with the…
-
0
votes1
answer583
viewsQ: How to drag some objects and forms in VBA/Excel and prevent the drag of others?
I’m having difficulties when trying to control "drag forms" and "drag objects" in VBA/Excel. For example: I have the main form that I don’t want to be moved, a second form is called from the main…
-
3
votes1
answer1405
viewsQ: Running text as code in VBA
The code below calculates the formula contained in the variable Text (String): Private Sub CalculeFormulaNoTexto() Dim Texto As String Texto = "= 90 / 3 + 7 + COS(0) + 1/7" ' A variável Texto recebe…
-
0
votes1
answer233
viewsA: Seeking Binaria and Ordination
Matheus, I did not run your code, but it may be that the fact that you are using the same "m" variable between routines is the reason for the error.
-
2
votes1
answer667
viewsQ: "Trace" no (VBA/Excel), how do I get the name of a subroutine?
How do I take the name of a subroutine (VBA/Excel) within itself to use in a code of type "Trace"? (see basic code in block UPDATE after the example code) The idea is to use something like…
-
12
votes2
answers1686
viewsQ: VBA/Excel Combobox : Disable Auto-Complete
I’m typing a text that’s in a Combobox of VBA/Excel, but the initial part of the text matches another already included in the list, besides completing it automatically (which I do not want), it…
-
3
votes2
answers5064
viewsQ: How to use the name of a cell of the Excel spreadsheet in VBA, not to indicate row and column?
How to use the name of a cell of the Excel spreadsheet in VBA, not to indicate row and column? For example, I named "Client Name" to cell B20, when I use this name in VBA to put in label (…