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
answer500
viewsSeveral filters with VBA
Guys good afternoon I need to perform a filter on a worksheet column, collect a certain value and delete the rest of the same column. I have this code but it only works for 1 tab. I need a Cod for…
vbaasked 6 years, 5 months ago John Hebert 151 -
1
votes0
answers76
viewsDoubts in excel
I’m creating a macro where you send emails, but I’m stuck in a process. I wonder if it is possible to create a column where I select a reason for pending, for example "lack of rg" that when…
-
1
votes1
answer526
viewsError: The Incompatible Types
I am running a PROCV in one column, looking for values of another. The code runs to a certain value and appears the error quoted. But there is no difference in the numbers, even I have already put…
-
1
votes0
answers170
viewsQuestions about objects in vba Excel
I am working now with vba, however it is a language that I had little contact in graduation, I would like to ask a question. When a macro in an excel file calls another excel file that also has…
-
1
votes1
answer226
viewsinsert another form value automatically into the active textbox
I come again to you to ask for a help. that in my view is of the hard level. I have two basins the first has five textbox the second is a Numpad with buttons from zero to nine, the comma , the enter…
vbaasked 6 years, 4 months ago Lindomar Marques 11 -
1
votes1
answer1233
viewsExcel: load list of names according to the selection of another list
in the school I work has a file with the class spreadsheets (the name of the spreadsheet is the class number. Ex: 100, 200, ...). I need to make a spreadsheet in this same file to generate…
-
1
votes1
answer497
viewsExcel and SQL - Connection between Excel file
I have the code on (end) that I picked up on the internet. This line of code gives error in WHERE, because it is a text: strSQL = " SELECT [VENDAS$].[Data], [VENDAS$].[Vendedor], [VENDAS$].[Total]"…
-
1
votes1
answer54
viewsAccess - saving data
I have the VBA code below that saves a new release. When Close the Form, even if I have entered any name, it is not saved. But I noticed that Access automatically generates a new primary key, ie…
-
1
votes1
answer2238
viewsVBA - Delete only last row of table containing text
I’m having a very specific question. I hope you can help me I have a spreadsheet that contains a table called "Activities". I have some form controls to fill the same but I emerged the need to…
-
1
votes1
answer131
viewsLimit Formulaarray
Range("B11").Select Dim Rmts As String Dim Busca As String Rmts = "C:\Users\Treinamento\Desktop\Trabalho em vba\BC\[Relacionamentos.xlsx]Matriz_Trein_Obrigatórios" Busca =…
-
1
votes2
answers3166
viewsVBA - Read a file. TXT and manipulate its lines
I’m trying to make a Query generator using Excel (VBA), but I’m not able to manipulate some data inside a file . sql. Ex.: Select * From Tabela t Where t.id = 1 <PROP> Every time he finds a…
-
1
votes2
answers2022
viewsAdd paragraph in vba
I have several cells I want to concatenate to send an email through excel Turns out every cell I wish I had line breaks but I’m not getting I’ve used Wraptext and Chr() but it’s not working, someone…
-
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
answer1097
viewsError pasting data in Excel with VBS
I have a simple spreadsheet in Excel(3 cols and 2 lines) and am trying to create a script to open it, copy your data and insert them into other spreadsheet with the same structure using a form.…
-
1
votes0
answers86
viewsRecurring errors generating a word file from fields of an excel spreadsheet (VBA)
Good afternoon, I never programmed in VBA but I found myself in a need where I am needing to generate a word document from some cells of a spreadsheet in excel, after searching several websites on…
-
1
votes2
answers6120
viewsExtract SAP data through Excel
Hello! I’m trying to integrate Excel with SAP via VBA. I would like to run the transaction "MB51" with some parameters like date, deposit and movement and bring the data obtained to the Excel…
-
1
votes0
answers63
viewsMacros outside of Excel?
I’m venturing through the world of programming, and at first, I’m using a lot of VBA in the company, and it’s helping me a lot, tasks that took hours, I’m doing in a few seconds using macros! I work…
-
1
votes1
answer299
viewsVBA - Open an explorer page, do a search in google images, give scrolldown to the bottom of the page and use the console
I’m developing a VBA module to open google images, search "cement", scroll the page down to the end and then use the console to input some scripts into javscript. The Code so far is as follows:: Sub…
-
1
votes1
answer282
viewsHow to create a dynamic table with multiple line fields using VBA?
I want to create a dynamic table with several line fields. But, these line fields need to be changed according to the data entered in the Excel spreadsheet. I tried to define the variables and use…
-
1
votes1
answer254
viewsSimple Quotes in Access
I have an Excel macro that reads the cell’s contents and saves it in an Access type database, when I try to insert a string that has simple quotes in the middle of the string and the following…
-
1
votes1
answer138
viewsChange the Excel icon
Hello, I start apologizing, I’m not from C or C++, but I really need a help that can be given by as much as the other, I work with Excel solutions modeling the XML interface, I created an…
-
1
votes1
answer2720
viewsVBA - How to send specific cells of a spreadsheet in the body of an email
Hello, I’m trying to make an application for my work in VBA, however I’m having difficulty sending only some cells in the body of an email directly via outlook. Private Sub CommandButton1_Click()…
-
1
votes1
answer193
viewsVba web scraping
Hello, I have a problem when performing a web Scrapping on the site "https://esaj.tjsp.jus.br/cpopg/open.do" In VBA I can open the site and everything and even enter the values I want, the problem…
-
1
votes0
answers225
viewsBrowse Json VBA Object
Good night, I’m having difficulty traversing the object to get the result of a API Object to be covered Sub AtualizarJogadores() DoCmd.SetWarnings False Dim Movie As Object Dim R As Object Dim…
-
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
votes1
answer124
viewsI need to compare the value of the last filled cell with the antepenultimate
ola thank you for your attention. I need to compare the value of the last filled cell with the antepenultimate. if the value is different I want to continue with the current value if seje = place…
-
1
votes0
answers45
viewsWeb Scraping with error
I have the code below that is wrong on this line: Set JSON = JsonConverter.ParseJson(response) Below is the complete code. Option Explicit Sub GetCompanyInformation() Dim hReq As Object, JSON As…
-
1
votes1
answer287
viewsExcel x Web Scraping - FIPE table giving error
The code below works perfect to return data by Excel with Web Scraping. I installed in the file the module VBA-JSON-2.3.1 - module name Jsonconverter.bas. I enabled the Microsoft Scripting Runtime…
-
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…
-
1
votes1
answer126
viewsHow to put a code when you add a commandbutton?
so I don’t really know how to use this, of questions and such. But like, I have a vba sub that when executed creates an object(a button). She’s working on the part of creating it but I need when she…
-
1
votes1
answer574
viewsReset a dynamic array - Redeem or Erase?
I have a UserForm with three OptionButton and three ListBox. When opening the UserForm all three ListBox are loaded with different texts, because each one relates to a type of data as is explicit in…
-
1
votes1
answer177
viewsApply button - Visible cells
I have a form where there is a Listview, and textbox for data input and already by login I can filter a column, to appear only the fields I want. Where is the problem? the intention is, I click on…
-
1
votes2
answers608
viewsAlgorithm that performs the combination of elements of a vector in VBA?
I need to take a vector in vba with any N elements and perform the combination of such elements. The idea is to have a function that takes 2 arguments. The vector with the elements to be combined…
-
1
votes1
answer418
viewsgetElement does not declare the object (VBA) . IE
I need a little help in a code, VBA interaction in IE, use a page to extract daily reports, and currently this page has undergone a version update, my codes are almost all worked however the code…
-
1
votes3
answers426
viewsSelect area escpecify in excel VBA spreadsheet
I have the table below in the photo, and would like to create a stacked area chart based on benchmarks (column values). I’m using the following code Private Sub CommandButton1_Click() Dim planilhaB…
-
1
votes0
answers201
viewsEXCEL - VBA - SQL - Doubt in the query using CAST
Hello, First I apologize to ADM if there is any error in formatting the question, I am novice here rsrs. I have a question in the QUERY query using MAX and CAST Goal: Return the highest value in the…
-
1
votes1
answer284
viewsRuntime error 13. Incompatible types
I was building a simple listing, and came across the 'Runtime Error 13. Incompatible Types'. When I Clear it tells me that the error is in the two lines of code of my 'If', referring to the dates.…
-
1
votes1
answer1287
viewsCorrect formatting for excel vba time
Good afternoon! I’m finding a problem that I thought was basic but that I couldn’t solve. I have a Userform (Entradas) to register entries. These entries are played to my spreadsheet in Excel. In my…
-
1
votes1
answer32
viewsVBA pick up information on website
Good afternoon! I have a macro to bring information from google shopping, but I can only bring the first value you find and I would like you to bring the 3 first ones you find. Below is the test I…
vbaasked 4 years ago Felipe Massao 11 -
1
votes1
answer51
viewsHow to exit the VBA loop
Hi guys vcs can help me, I’m running two loops, but I need to stop running the loop when the rows2 variable equals 38. I’m a beginner in programming. I don’t know how you solve. Sub qty() rows1 = 2…
-
1
votes1
answer29
viewsVBA error while deleting tab
My dear good day! I need your help with the code below. Sub atualizar() Application.DisplayAlerts = False Sheets("Reembolso").Delete Application.DisplayAlerts = True Sheets("Modelo").Copy…
-
1
votes1
answer40
viewsVBA Script Help for excel
I am developing a script for Excel, which copies specific fields from one sheet, and pastes into another, takes the name of the A9 cell and saves a file with the data copied with the name of the A9…
-
1
votes0
answers55
viewsCut a number of characters inside a VBA cell
I have a VBA doubt! Using a VBA code I imported data from a spreadsheet in excel to another spreadsheet. However, in column A, starting with cell A2 the copied information is in the following format…
-
1
votes1
answer215
viewsvba excel to save sheets of a pdf file with the name of each sheet
I don’t know much about VBA, but I need a routine that saves each of the spreadsheets of a file in separate Pdfs, for example: The excel file RELATORIO has within it 24 spreadsheets (nominees:…
-
1
votes1
answer29
viewsHow can I analyze several distinct elements in excel using 3 logics for the same column?
So, guys, I have to sort out an excel table of investments, but I have no idea how to do that. They are 2 logic for a column where appears the (Difference of a product purchased the previous day…
-
1
votes1
answer143
viewsRuntime Error 438: Object does not accept property or Methods
I’m adapting VBA code for scraping, but I’m getting this message when it comes to sending the data to the Login form. Runtime Error 438: Object does not accept property or Methods Public Sub…
-
1
votes1
answer55
viewsProblems with web automation in VBA - Radio Button
Hi, I’m new around here, I am facing a problem with my VBA code, I am trying an interaction using the internet explore, I need you to do the following steps access the site:…
-
1
votes1
answer39
viewsVBA - I cannot reference there is a Range using the Cells method - ERROR 400
This first method gives me an ERROR 400 Worksheets("RELAT").Range(Cells(i, 3), Cells(i + 1, 12)).Value = Worksheets(mes).Range("P5:Y6").Value This second method works normally…
-
0
votes2
answers1443
viewsMove images on VB6
Option Compare Database Private Sub Command0_Click() Do Until Me.Width < 4000 Let Image1.Left = Image1.Left - 5 DoEvents Loop End Sub Just like this allows you to move the image from the right…