Most voted "vba" questions
Visual Basic for Applications (VBA) is an event-oriented programming language with limited object support, used to write macros, available for the entire Office suite.
Learn more…792 questions
Sort by count of
-
1
votes1
answer2259
viewsExcel vba: Saving data from a spreadsheet in . txt format
Good afternoon. I have the macro below and it already does almost what I want (creates a txt file with the data of the Historico spreadsheet, always rewriting the file, ie, does not create several…
-
1
votes1
answer1985
viewsAuto VBA Filter - excel
I need to make a filter with a certain value in a spreadsheet tab,after the filter is done, I need to copy, open a new document, and paste this statement. I developed the code below but it’s not…
vbaasked 6 years, 6 months ago John Hebert 151 -
1
votes1
answer415
viewsHow to execute a VBA command on a sheet with a specific name?
I have an Excel document with several sheets. In this document I need to execute a command on a specific sheet, that is by the sheet name. But if that sheet does not exist execute another command on…
-
1
votes1
answer130
viewsDelete unwanted VBA values
Guys good morning, I have the following macro to run a filter inside a column and bring me a determined value. however, within that same column there are other values, I would like to exclude the…
vbaasked 6 years, 6 months ago John Hebert 151 -
1
votes1
answer128
viewsCopy, Filter paste vba
Guys good afternoon, I need to filter the data in column B containing "Cell 01" And delete the other data from this column.( in VBA ) I have some observations to be made in the project. 1- I need to…
vbaasked 6 years, 6 months ago John Hebert 151 -
1
votes1
answer2071
viewsHow to search in a column by value =< 200 (run command)?
I intend to search row by row within the column P:P a number less than or equal to 200 and execute a command. If more than 200 execute another. The values are defined as 0.0. If .Value =< 200…
-
1
votes1
answer85
viewsHow to implement the Factory project standard in VBA?
I would like some methodology or example to try to simulate the application of the Factory project standard in VBA.
-
1
votes1
answer377
viewsFilter dynamic table (Power Pivot) by Listbox
This code: /a/309087/116347 Make the selection in Listabox ... and Filter activated by a button.. as described in the link... But if the Dynamic Table is created by Power Pivot .. This code does not…
-
1
votes2
answers224
viewsCheck the end of the song and run macro
Hello, I am making a virtual sound table for an event and would like to give the effect of clicking the button. I am making mega simple, but I need the button to be pressed while the music plays and…
-
1
votes1
answer196
viewsGet the result returned at Do F4
I created a VBA that shows a vendor list and can’t get the selected item after F4. Public Sub ListaFornecedores() Dim strSql As StdBEStringBuilder Set strSql = New StdBEStringBuilder strSql.Append…
vbaasked 6 years, 3 months ago acamiloMoz 69 -
1
votes2
answers72
viewsMacro problem that performs dynamic sums and non-continuous intervals
I have a spreadsheet where column A has following values (1,2,4,6,8,10), and the fields with value 1 should be the sum of all groups 2 below it until the next value with field 1, and group 2 shall…
-
1
votes1
answer1450
viewsOpen Excel spreadsheet and copy the Data into VBS
Hello, I have a simple spreadsheet (3 cols and 2 Rows) and am trying to create a script to open it, copy your data and insert into another. Path =…
-
1
votes0
answers301
viewsFor Each In . Control GROUPED Shapes for excel
hello would like to make a For Each In . Shapes "those shapes" but they grouped I was able to assemble with them disaggregated, but grouped it seems that the procedures are different what I’ve…
-
1
votes2
answers6025
viewsAdd blank Excel line using VBA
I have a spreadsheet with 10k lines, in this format (example): 3004977 \{DOWN} \{TAB 9} REMESSAS \%S 18082017 \{TAB} 2 \%D \^ S 3004972 \{DOWN} \{TAB 9} REMESSAS \%S 18082017 \{TAB} 3 \%D 3004972…
-
1
votes1
answer18482
viewsCompare two columns in EXCEL and if they are equal return a certain value
I’m having a hard time generating a logical structure (If) to validate some data. It’s for a survey. follows the explanation: There are two columns (B and H). In the column B there are all Brazilian…
-
1
votes2
answers422
viewsLoop to Repeat Names
Dear community, I believe it is simple the most solution, I am trying to make the following rule of business: I have a list of names on a Plan1, I need the name of each of them to be repeated by 12x…
-
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
votes0
answers67
viewsExcel VBA on MAC
Good night! I use a lot of Excel VBA on a PC computer. The VBA used in Excel for MAC is the same?
-
1
votes1
answer72
viewsSE function with 3 final values
---Rephrasing the question--- A formula expressing the following information: -When Column I and J is written "Letter N" will return in column C the writing "PSI" -When Column K and L is written…
-
1
votes1
answer347
viewsHow to separate Edit String in Excel
I need to separate this type of string (Example): 1 Estruturas lógicas. 2 Lógica de argumentação: analogias, inferências, deduções e conclusões. 3 Lógica sentencial (ou proposicional). 3.1…
-
1
votes1
answer587
viewsReplace VBA method
I would like to know how to use the method Replace with dynamic variables in VBA. My line is : Replace (Cells(endereco(linhaAtual).Row, 22), item.Value, "") In this case the variable where the…
-
1
votes3
answers8269
viewsHow to add character after last word written on line
Dear community, I have a doubt that I’ve tried everything, but I can’t solve. I have a list of former names; José Mario da Silva Mariana Cristina William Caio Jorge Luiz Campos de Silva Andrade In…
-
1
votes1
answer466
viewsHow to change text within Text Box in Word using VBA
I am trying to change the text within the Word Text Box. I am not using any Activex for this, it is the normal Word text box same. How do I do this by programming by VBA? I can make changes to the…
-
1
votes1
answer279
views -
1
votes1
answer1600
viewsIF condition - Show or Hide Textbox
Expensive, I have 4 optionButton (2 different groups), where 2 represent "Yes" and "No" for two different questions. What I want to do: When the user chooses the NO option in group1 and then chooses…
-
1
votes0
answers294
viewsRecover last entered value in a specific column of Excel VBA
I need to retrieve the last entered value in a specific cell of the worksheet, for example: coluna ID 1 2 3 4 ... 2550 I need to get the value of ID (2550) to be able to increase and execute other…
-
1
votes1
answer152
viewsVBA - Maximum character in dropdown-list
' Validação Motivo Columns(motivo).Select With Selection.Validation .Delete .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _ xlBetween, Formula1:= _…
-
1
votes0
answers32
viewsRanges in different columns, but same row (VBA)
I have 3 different ranges of different values, for example: Range1(a,b,c), Range2(d,e,f), Range3(g,h,f). These 3 ranges are already in specific worksheet columns, that is, the first in column B, the…
-
1
votes1
answer980
viewsExcel VBA - Check file size and type
In my spreadsheet I have a button that displays the file selection box. After selecting an image, this is displayed in a specific cell. How do I check if the chosen file is really an image? and To…
-
1
votes1
answer41
viewsVBA formulas with @
When you write the formula of a function by VBA, and add some excel formula, it increments a @ before the formula automatically. For example: Selection = "=SOMA(A1)" In the spreadsheet formula bar…
-
1
votes1
answer915
viewsTranslate Captcha
I’m developing a routine that researches vehicle charges and restrictions in the DMV, and to download the document, I need to go through a Captcha validation, and it’s already taking my sleep away.…
-
1
votes1
answer1729
viewsFind and Copy sheet line to form, change fields and write to the same sheet with new ID
My question is as follows: I developed a VBA form with 20 fields, which registers in the Bdados spreadsheet, also inserting an ID. What I want is to find and copy a record of the spreadsheet to the…
-
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
answer26
viewsFiitro - Excel VBA
I’m trying to create reports. I’ve never done this before because then any and all help is very welcome. My table starts in column "A" and goes to column "BL". There are 64 columns. I want to filter…
-
1
votes1
answer1216
viewsTo rename a folder added the current date to the name
I have a folder where I keep data that needs to be updated daily. To not miss the history copy this folder and paste elsewhere. But, after copying and pasting the folder, I need to rename it with…
-
1
votes2
answers87
viewsDelete rows that in the column contain a certain value
Hello everyone I’m trying to find a quick way to the following process, my base has 68000 lines all filled, and as time goes by it increases, in my column G has the names of the cities, I made a…
-
1
votes1
answer445
viewsVBA - Error: The 'frames' method of the 'Jscripttypeinfo' object failed
I need to fill the 'Legislation' tab with the text "Energy Development Account" and do the research. But when executing the code appears the error quoted in the title referring to the line "obj =…
-
1
votes1
answer275
viewsProblems in VBA code execution
This code clicks on the 'Legislation' tab and fills a field with a given text (2º For Each) and clicks on the search button (3º For Each). The problem is that when I run the code, it clicks on the…
-
1
votes1
answer635
viewsError '70': Permission Denied
When I run the code below, the title error appears in the 'For Each' line. This is a block of the site itself or there is some error in the code? Declara função Sleep If VBA7 Then Public Declare…
-
1
votes0
answers35
viewsHow to find cursor in Textbox?
Hello! I need to know the position of the cursor in the Textbox when the user type a character (add a word at this position if the character is within the conditions applied in the rest of the…
-
1
votes0
answers718
viewsImport Table from Web Page to Excel
I want to take all the data from an internet table and put it in excel. I tried with the code below, but the following error appears in the line of 'For Each': "Runtime error '438': Object does not…
-
1
votes0
answers95
viewsAdd cascading data from a column in Access with Status by Row
I need to create a control of purchases per line where generates a purchase need considering the quantity of each product per customer compared to stock availability. As in the example of the table…
-
1
votes1
answer223
viewsVBA - Form that feeds a spreadsheet with values
Dear, I am new in VBA and for my project I am trying to make a userform that feeds a spreadsheet according to the information that the user input. I’m having a mistake I don’t understand how to…
vbaasked 6 years, 6 months ago Felipe Stenzel 45 -
1
votes1
answer44
viewsSkip digits when running
I have a problem, I took right here a script to enter the ninth digit if the phone starts with 6,7,8,9.. Function ValidarCelular(Myrange As Range) As String On Error GoTo ErrHandler: Dim regEx As…
-
1
votes1
answer279
viewsHow to update a website page after changing the value of a field by VBA
Good night. I wonder how I can update the page with the date I informed by VBA. I put the date but the page does not change. Since there’s no button, I don’t know what to do. Sub Links() Dim ie As…
-
1
votes1
answer955
viewsGenerate a file and attach in the email with vba
I did a macro where she opens the outlook, until then beauty. now I need to complement her with the following items. I need to take 4 tabs of my spreadsheet, generate a new file and then attach in…
vbaasked 6 years, 6 months ago John Hebert 151 -
1
votes0
answers185
viewsSet Invokepattern problem = Button.Getcurrentpattern(Uia_invokepatternid)
I have a problem with the save button on IE11 - I changed the field to the language of the program (Portuguese). Sub DownloadFile(h As Long) Dim o As IUIAutomation Dim e As IUIAutomationElement Dim…
-
1
votes1
answer1025
viewsHow to Load a listview with more than 30 columns?
I’m trying to carry a ListView with more than thirty columns using the following code: With ListV_P Sheets("BANCO").Select Dim UltimaLinha As Variant Dim Linha As String '.GetFirstVisible = True…