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
-
0
votes1
answer80
viewsInsert signature already made in macro VBA
I would just like to insert a signature made in Outlook itself with image and text in this VBA, but I do not know how. Follow the code: Sub Aplicacao_Fundo() Dim OutlookApp As Object, OutlookMail As…
-
0
votes0
answers269
viewsvba runtime error '-2147221164 (80040154)': Unregistered class
i made a class library in visual studio 2019 using the . NET framework which is registered for COM interoperability and generates a file (.tlb). It was programmed in VB.NET and has a simple class…
-
0
votes1
answer154
viewsVBA excel perform action from dropdown selection
Talk people, good afternoon, all right? I came to ask for help from the university because I’ve been racking my brain for days and I can’t seem to solve my problem. I basically have this table: By…
-
0
votes1
answer22
viewsValue calculation and result print in cells on the right
I am developing a macro in VBA and I need to take each of the cells in this range and go through a select case function. So far so good, the problem is that it makes me calculating prices and…
-
0
votes1
answer27
viewsVBA - Redeem the value of a website variable
Good evening, everyone! I’m starting in VBA and I made a macro that returns the information of a pro Excel site, but I’m adjusting some things and I came across a problem a few days ago and I can’t…
-
0
votes1
answer36
viewsVBA - How to autocomplete a word in the middle of Textbox
Hello! I am developing a VBA project whose main input is a function f(x,y). I still find it difficult to configure the Textbox to limit the entries, for example: when inserting the "c" character, I…
-
0
votes1
answer26
viewsVBA - Copy and paste column to the new tab with the given code
Hello! I have a VBA code in the format below. It takes all the information from column B and sends it to another tab, whenever the value of B1 is changed (only does not create another, if you…
-
0
votes1
answer43
viewsHow to send dynamic image in the body of the email with VBA
I created a macro to send different images in the body of the email to different people. The problem is that I am not able to leave the dynamic image in the body of the email. It is attaching right,…
-
0
votes0
answers15
viewsI would like a help to transform this VBA code to the Google Apps Script script script
I would like a help to transform this VBA code to the Google Apps Script script script. Dim HTMLDoc As HTMLDocument Dim oBrowser As InternetExplorer Sub Login() Dim oHTML_Element As IHTMLElement Dim…
-
0
votes0
answers28
viewsVBA System User Input
Good afternoon, my friends. I arose a demand here in the company in which I do not understand much that would be in VBA I am sql programmer and went to learn a bit of vba to be able to automatically…
-
0
votes0
answers26
viewsselect option via vba
Someone can help me, I have this line of code and I need it to be executed via vba. This part highlighted in blue and the code when I click on a dropdonw-menu that appears in the first image, and…
vbaasked 3 years, 5 months ago Luciano De Laia Fanele 1 -
0
votes1
answer70
viewsHow to run a python script using VBA
I created a project that consists of sending automatic messages through the Telegram API, I did all this part in Python and works perfectly, as shown below. import requests from datetime import date…
-
0
votes0
answers19
viewsLoad table in Listview
I’m trying to load a table into listview but when I press the button it gives me a mistake saying that the Required object(error 424). Private Sub btnPesquisar_Click() With txtResult1 .Gridlines =…
-
0
votes0
answers18
viewsRelationship between two Combobox in Access
I’m trying to relate 2 Comboboxes in Acess, but I can’t find how to do it. This is my form, I would like when selecting the value in the field "Expense Type", the values of the field below,…
-
0
votes0
answers48
viewsHow can I reference filtered results from a list in VBA?
I am currently working on a code where I have to filter a certain list and go through the filtered data with a FOR and also perform some comparisons with IF. Follows the code Sub compararValores()…
-
-1
votes1
answer1241
viewsCopying record of table in itself via vba
Can you copy a record from a table and insert it in itself? I wanted to copy a record into a new one on the same table. INSERT INTO Produtos ( Produto, Preco ) SELECT Produtos.Produto,…
-
-1
votes2
answers3298
viewsHow do I view VBA button properties of an excel spreadsheet?
I have a spreadsheet with buttons that hide and re-export fields according to the filled data set. When I try to see or change the properties of the controls, I can’t. VBA only shows the properties…
-
-1
votes1
answer84
viewsAre there security problems when implementing and using "add-ins" in VBA (Excel)?
Due to security problems with macros in VBA/Excel, I was wondering if the same occurs (or something similar) when adding a supplement and use it later in projects of VBA. This would impact a user…
-
-1
votes2
answers902
viewsExcel form (Block fields)
I have a question about what formula I can use. I have a box with 3 options (Example: 1 , 2 , 3) and if I select the option 1 I can fill in the field 1 and are blocked options 2 and 3. If you select…
-
-1
votes1
answer3141
viewsUpdate dynamic table last. VBA
I created a spreadsheet connected to my ERP via ODBC and have some dynamic tables in the same spreadsheet. I’m trying to create a macro that updates all the data, but using ActiveWorkbook.RefreshAll…
-
-1
votes1
answer685
viewsImport workbook from another worksheet to a new workbook in the current worksheet
Using the example past in Microsoft MSDN, the following error is displayed: Run-time error '9': Subscript out of range VBA code: Sub Principal() Dim PathName As String Dim Filename As String Dim…
-
-1
votes2
answers152
viewsVba interacting with IE
I need to click on an element of a website: The problem is that there are several of these and I made this code: For Each obj In ie.Document.all obj.Click Next But this code clicks on all the…
-
-1
votes2
answers24244
viewsHandle Google Chrome with VBA
I’m creating a code that enters my company’s online system, but it can only be accessed by Google Chrome. The code to open Chrome is this: Sub Chrome() Dim GC As Object Dim WebUrl As String Dim…
-
-1
votes1
answer108
viewsreport filter excel
I am trying to make a report but I need a help the spreadsheet has to search by date and paste in another spreadsheet the data of that same date (example on the line that is dated today copy…
-
-1
votes1
answer282
viewsHow to make a VBA print
I have an excel full of information But I want to separate the information Imagining that I have in a cell A-ABC-DEF How do I get ABC to appear through a formula in VBA
-
-1
votes1
answer924
viewsVBA to fill empty cell
good morning, I have a spreadsheet in excel that I would like when I impute a date and press the macro button to paste into the next empty cell in column A, 74 times. And also copy two columns (B:C)…
-
-1
votes1
answer74
viewsError calling printing of a map in vba V9
Good afternoon, I need help to invoke in Runtime the printing of a map based on GCPVLS70, which uses the table "DESCVIAS": When using: Aplicacao.PlataformaPRIMAVERA.Mapas.ImprimeListagem…
vbaasked 5 years, 2 months ago Bruno Gomes 400 -
-1
votes1
answer805
viewsVBA Calling program in Python
Hello, I work for some time developing in VBA. but I’m beginning to learn Python and the following Doubt has arisen ... is it possible to unite these languages ? because I did not find anything in…
-
-1
votes1
answer184
viewsHow to print only the first page
Good afternoon, I have this code on my spreadsheet. Sub Imprimir() Dim LocalPDF As String 'DEFINIR O LOCAL ONDE SERÁ SALVO O ARQUIVO LocalPDF = ThisWorkbook.Path & "\" & Range("H5") & "…
-
-1
votes1
answer11365
viewsVBA + Whatsapp Web
Guys, I mounted a macro in VBA that triggers automatic messages according to some parameters determined in the table. The macro basically works with pressing the keys on the keyboard, very simple.…
vbaasked 7 years ago Gustavo_Tavares 27 -
-1
votes1
answer227
viewsThe file is locked - Excel and VBA
I have an excel spreadsheet with userform to control a database that is also in excel, this database for having many accesses is shared, but today I saw that VBA does not get along very well with…
-
-1
votes1
answer368
viewsExtract a text from a <td> with Selenium + VBA
I am trying to extract the 'PRESI-VALEC' value from this element in Selenium, I thought to use Xpath as follows: .Findelementbyxpath("//a[contains(text(), 'PRESI-VALEC')]/table/tbody/tr[2]/td[3]"),…
-
-1
votes1
answer37
viewsWebscript VBA array specifies
all right? I’m making a web scraping to update a spreadsheet of mine in vba. But the site I want to pull this information use td and tr and do not put class or id in the syntax. For example: I am…
-
-1
votes1
answer357
viewsExcel VBA Advanced Filter Problem
I made a program in VBA to calculate the cost in my company. For this I used two connections with the Oracle database. What’s strange is the fact that when I try to use the advanced filter manually,…
-
-1
votes2
answers20
viewsIf cell changed, move old value to side
I’m starting to use VBA with the office package, as I still know little I’m having difficulties to get this functionality. I was trying to do something simple and I needed help to understand how it…
-
-1
votes1
answer102
viewsVBA to save in PDF the Excel spreadsheet with the name of two Cells
The spreadsheet I save in pdf with this code: Sub Salvar_PDF() 'Antes de executar o código é importante definir a áreade impressão ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF,…
-
-1
votes2
answers34
viewsActive X buttons
I have a button (Activex - Commandbutton) on a spreadsheet that I would like to change color by hovering the mouse up. I did the following the code below, it even changes color but does not return…
-
-1
votes1
answer27
viewsHow do I change by vba the height of an image in Powerpoint WITHOUT changing the width?
In my code I do so to make the width of my image equal to the slide, but this way changes the height proportionally, and I do not want this. 'Criar Slide 2 Set ppSlide = Apr.Slides.Add(2,…
-
-1
votes1
answer23
viewsVBA Macro Tip - Variable content selection
I’m doing a simple macro, but I’m not getting it. I want the macro to locate the value of a specific cell, that this value is varying while the macro is generating: Sub teste() Range("C1").Select…
-
-1
votes0
answers4
viewsPass a multiline Textbox to vertical listbox (excel - vba)
Good afternoon guys, I have a textbox for registering production orders, multiline textbox to add up to 10 orders in the same box, but when releasing this data from the textbox to listbox they do…
-
-1
votes1
answer204
viewsVBA Listbox Automatic Filter
You can help me, I’m trying to make mine listbox load the spreadsheet 3, but he carries only the first line Sub Filtro() Dim linha, linhalistbox As Integer Dim valor_celula As String linhalistbox =…
-
-1
votes1
answer58
viewsRemoval of repeated values between two tables with VBA
I need help with the elimination of equal values between two tables. I have two tables with several different fields, they have a common field called cellular, one table has the number in the format…
-
-1
votes2
answers92
viewsconverts from Vb to c#
I have this code in Vb, I need it in c#. In Vb create a new code each time it is executed, in c# always puts the same code "000011". Public Function CalculaNovoCodBarras() As String Dim lista As New…
-
-1
votes1
answer44
viewsModify Sheet killer to just clean sheet content and not erase it completely
I’m using the following code I got here on the site Sub Listar_Pastas() '''''''''''''''''''' '==== Pastas ====' '''''''''''''''''''' Application.Calculation = xlCalculationManual…
-
-1
votes1
answer149
viewsFormula R1C1 Macro Error 1004
I have a macro to apply a formula to some cells. To be able to have the formula in VBA format I recorded the macro to generate it, but when I ran the macro it runs error 1004... U…
-
-1
votes1
answer335
viewsConvert CSV to xlsx, in vba
I am using this code to convert from CSV to XLSX. But it is ignoring the OtherChar:=";" and separating the columns in the comma. Dim xlApp As Object 'Excel.Application Dim xlBook As Object…
vbaasked 5 years, 1 month ago Miguel Neto 11 -
-1
votes1
answer80
viewsVBA code does not want to run in the desired tab
Good morning everyone, I’m sorry for the tongue inattention. I’m trying to write a code that reads a table in the "Premises" tab. The table has 3 columns that I am saving in 3 vectors to build…
-
-1
votes1
answer71
viewsExcel Cell with VBA
Hello, I’m trying to finish an excel spreadsheet with VBA, but I’m not able to capture an image after data insertion. For example: click user and he show the photo of the person and also the full…
-
-1
votes1
answer525
viewsHow to copy data from one spreadsheet to another with VBA
I have a problem to copy data from one spreadsheet to another, because either it does not run or simply does not copy, so, now I am using the code below, but it gives error in the definition of lr,…
-
-1
votes1
answer162
viewsLoop in Email with VBA
Hello Good evening/day/afternoon, I have a question regarding writing an email using a macro. Doubt this macro Test_logico() is done to read a column X and if different from "NO" it copies and…