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
answer204
views"Fade in and Delete - VBA" effect
for kindness, I’m with a doubt in VBA - MS EXCEL 2016 I need to create a macro that when I trigger it, it looks for a.png image on my computer and inserts it on the spreadsheet with the gradual…
-
0
votes1
answer222
viewsFill in combobox on web page via VBA
I am trying through VBA in Excel, fill a combobox on a website. But when I run the code, that error message comes up saying that "the object does not accept this property or method". The part of the…
-
0
votes1
answer1488
viewsError 381 listbox.list VBA
Hello! Basically I need to add up the values of listbox, only my program is showing the following error. Runtime error '381': Could not fetch List property. Invalid property array index. Private Sub…
-
0
votes1
answer83
viewsHow to change position values for a given resource?
Another Hardcore challenge, I don’t know if I can explain it well, but here it comes. In the table below, I have the resource "X", where he has already made 8 contacts( 5 completed and 3 not…
-
0
votes0
answers1197
viewsClick on Button with VBA
Good morning, I have a macro that accesses a site, enters the data and performs research, but I’m not able to make you click the "Query" button, could anyone help? Follows page HTML and macro code;…
-
0
votes1
answer474
viewsHow to use Err.Clear correctly
Good afternoon, everyone. This is my first question here in the forum, so I ask forgiveness if it is not easy to understand my doubt. Next, I have one script that automates nfs approvals on SAP, but…
-
0
votes1
answer938
viewsSum and display more than 24 hours hours in Access 2007 VBA
I’m using Access 2007 to develop a garage control form, which contains information about trips made by drivers. I need to calculate the total time of each trip, and that period can be longer than 24…
-
0
votes0
answers72
viewsExcel VBA - strange behavior!
Strange behavior in VBA Excel! The code opens a source file, and copies an existing table. Pastes the Table into a target file - in the SUPPORT sheet - and closes the source file. In the destination…
-
0
votes1
answer1384
viewsSleep or Wait function catching spreadsheet in Excel
I am programming a macro in vba, which makes the connection to a sql server database and makes a select in a table and returns me the time of the last change in the database. I created a program in…
-
0
votes1
answer1319
viewsVBA to send email
I have a VBA code to send a range as image, by outlook. But he doesn’t always glue the image to the email body, but to some part of the spreadsheet. Is something wrong with the code? thank you Sub…
-
0
votes2
answers4373
viewsUse VBA to delete lines with a cell-determined criterion
I need a Vba that does the following action: The moment it is activated, read a specific cell and delete lines from another tab taking into account the specific cell as a criterion. Example: In…
-
0
votes1
answer151
viewsRename attachments before saving
Gentlemen, I have the following problem. Every Monday, I receive from a system 12 emails, being them: SIXTH: MIPS_1 MIPS_2 MIPS_3 MIPS_4 SATURDAY: MIPS_1 MIPS_2 MIPS_3 MIPS_4 DOMINGO: MIPS_1 MIPS_2…
-
0
votes1
answer446
viewsCopy lines and paste based on a value in an excel cell
I would like to know how to copy a set of lines. For example, line 1 through 5 and paste on lines 10 through 15. This action would be done with the value 1 in another sheet and in cell A1. I have a…
-
0
votes1
answer983
viewsThe Value method of the Range object failed
Good evening, I’m making the following mistake: The Value method of the Range object failed The complete code is found here: By the Ghostbin Private Sub CommandButton2_Click() ''' Botão "CADASTRAR"…
-
0
votes0
answers175
viewsVBA programming - Recursiveness, boolean backpack
I have a similar situation to boolean backpack. I have a table with N lines. Column 'A' contains a length (m²), column 'B' contains a price (R$). I need to get all possible sums from column 'A' up…
-
0
votes1
answer901
viewsVBA - Generate a multi-excel PDF file
I am trying to make a code to generate a PDF for each Excel file I have in a folder. First my code generates a PDF each excel file and then generates a PDF that would be the cover of all these…
-
0
votes1
answer40
viewsAggregating row-by-row information in excel column
Good morning My goal is to transpose in vba these 2 lines to (in this case 6 lines) I mean, what I want is to repeat all the information but then I just want to have a column of privileges even if…
-
0
votes2
answers1694
viewsVBA copying Brazilian standard date in American standard
I have the code below in a macro, to copy a TXT file separated by semicolon to an Excel file: Sub Atualizar_Dados() Application.ScreenUpdating = False Application.DisplayAlerts = False 'Abre o…
-
0
votes1
answer2783
viewsHow to extract data from internet by VBA
I’m trying to extract a specific table from a website and paste it into a spreadsheet to update a database daily. But as it is impossible to download the table as excel or csv, I must extract the…
-
0
votes1
answer124
viewsFixed Range Macro Problem
I created a macro to select cell information from a dynamic table and copy to a new table. Sub tabela_tratada_3_var() ' ' tabela_tratada_3_var Macro ' ' Range("D1").Select ActiveCell.FormulaR1C1 =…
-
0
votes1
answer155
viewsAdd Item and Index to combobox
Hello, I would like to insert in a combobox the Item and the index of that Item. The item (function_name) I do through a query in a database and I wanted the index to be the working id_function.…
-
0
votes1
answer2299
viewsHow to convert textbox to number and date in VBA
I have a vba in Excel, however the command saves the entries as text, so it is not possible to apply any formula. I’ve done some trials and research but all of them were failed, follow the codes:…
-
0
votes2
answers51
viewsCheck whether certain parts of a spreadsheet have data
I have a spreadsheet that has two parts and I want to check if both have data. If the Part 1 and the Part 2 have data, the code paints the corresponding yellow line. If only one of the parties has…
-
0
votes2
answers928
viewsCreate folders from cell information, with the file "test.txt" inside each folder created (VBA)
I have a spreadsheet with some information, I need this information to become folders and within each folder there is a file called "test.txt" In a search, I found the following code: Sub…
-
0
votes1
answer726
viewsVba: How to align left a selection of cells sent in outlook as html?
I will delete parts of the code to facilitate viewing the problem: Dim objSelection As Excel.Range Dim objTempWorkbook As Excel.Workbook Dim objTempWorksheet As Excel.Worksheet Dim strTempHTMLFile…
-
0
votes0
answers1062
viewsChange data in a spreadsheet through a listbox
I have a form with two text boxes, three command buttons, a listbox and some Abels. The purpose of the form is to list data that is entered in the database (which is the excel spreadsheet itself).…
-
0
votes0
answers38
viewsWhich version of Visual Studio to use?
Hello, I have a problem related to which version of Visual Studio to use. The scenario is this, the company I work for has nothing to do with software development, but I’m a programmer and we…
-
0
votes2
answers218
viewsGenerate Tables and insert formulas with variable range (VBA)
Good afternoon to all! I’m trying to develop a code to export reports in an automated way and optimize my time at work, but I’m having difficulty in a few steps. I will put step by step what is my…
vbaasked 5 years, 8 months ago Flavia Barcellos 1 -
0
votes0
answers50
viewsWrite in IE text box using VBA
Hello, Question one: Can VBA communicate with HTML5? I tried to make the VBA click on the "buttons" of a page programmed in HTML5 using the methods .Document.Getelementsbyid,…
vbaasked 5 years, 8 months ago Murillo Carvalho 1 -
0
votes3
answers132
viewsExcel vba - bug when inserting several cells at the same time
I need to assemble a table in which information will be inserted in columns A B and C, and the date and time of when it was modified will be inserted in column D I created a simple program q saves…
-
0
votes2
answers540
viewsVBA programming error: runtime error '-2147417848 (80010108)'
Hello, I’m trying to make a macro with VBA to automate a process in the company I work in. For this the macro should open the IE and enter the website of the company portal. Follow the code written…
vbaasked 5 years, 7 months ago Murillo Carvalho 1 -
0
votes0
answers63
viewsVisual Basic 2010 with connection to Access with images
Good morning, I am conducting a school project in Visual Basic 2010 with the link to an Access database on Football. But I want to do something more complex and include images in the players,…
-
0
votes1
answer281
viewshow to populate a site field using excel vba
I would like to know how to fill the field. I have tried several combinations to fill the highlighted textbox in the photo, but nothing works. I tried things like: IE.document.all("stk…
-
0
votes1
answer697
viewsHelp with VBA Excel - lock cell after fill
Hi, I’m trying to improve the control spreadsheet of the company I work for, but I’m having trouble. We have to register a customer’s call, I have already been able to fill in the Date and Time…
-
0
votes1
answer108
viewsHow to create a chart with the last row data automatically when closing the form?
I’m making a VBA form with information about some municipalities (that are in Combobox) and their respective goals to be hit (which is like a direct formula in the spreadsheet). In the form I insert…
-
0
votes0
answers101
viewsAdd signature to Outlook email
I created this code to send emails after selecting completed in Excel, unfortunately I can’t add the Outlook signature in the code. Can you help me? Private Sub Worksheet_Change(ByVal Target As…
-
0
votes0
answers115
viewsWeb Scraping on Infomoney page
I have the code below that accesses the Infomoney page and selects the All option from the button to return all results. The problem is that it only selects, but does not click to return all…
-
0
votes1
answer58
viewsHow to generate a report from a recorded macro?
Good afternoon to you all, I recorded a macro to generate a report from a spreadsheet that I am feeding with data. Basically the macro will create another workbook in the same worksheet and paste…
-
0
votes1
answer2411
viewsImport data from a txt to EXCEL spreadsheet via VBA
I would like help to import this file to an excel spreadsheet through VBA These data below are the ones that are in the txt file for import, to help me, just save them in the notepad…
-
0
votes2
answers551
viewsExcel with slow macro
Good afternoon After a simple copy macro, to update a planning sheet, the excel file becomes progressively slower, both in the execution of the macro and in the normal workability (write, drag…
-
0
votes1
answer157
viewsConditional completion
I need a help with VBA. My question is this:: I need cell "B" and "C" to receive a specific value when I type a value into cell "A": For example: When I type the value "1" in cell "A", cell "B"…
-
0
votes2
answers239
viewsActivecell.Formula compatibles types
I am Using VBA and I came up with an impasse: I can use a variable I created as a parameter to fill a spreadsheet? I created an interactive Button and I am developing an algorithm that fills the…
-
0
votes1
answer99
viewsHow to Reverse Settlement Documents
I have a development in dotnet that consists of a document integrator from another system in Spring V9 and I intend to do the reversal of settlement documents (REC) for the respective Estorno…
vbaasked 5 years, 4 months ago Liliana Matos 13 -
0
votes1
answer157
viewsUse VBA in excel to fetch data in . Docm files located in Subdirectories
Good morning, I have following problem in a VBA code that I use in Excel to pull data from forms created in Word. If the files. Docm are inside the same folder I can pull all the data I need from…
-
0
votes1
answer90
viewsReplacing and concatenating the contents of a cell
First I filter the contents of a table column to get everything that does not contain /. ActiveSheet.Range("A1").AutoFilter Field:=3, Criteria1:="<>*/*" With this result, I would like to…
-
0
votes1
answer112
viewsADO fails to connect
I have a project in Excel where I am trying to make a connection to SQL Server database. I am working on a virtual machine and the database is on another machine, however they are all on the…
-
0
votes1
answer244
viewsTake the code in a cell and format the e-mail using this value (VBA) (EXCEL)
My problem is this: I use a company tool that gives me a specific number for each client. When I send email to the client, I need the subject to contain this number. With that in mind, I found a…
-
0
votes1
answer289
viewsVBA Variant array position for String
Good morning, I have in the Excel a search that returns a ARRAY of Variant filled with the full address of the found files. I need to pass each array position to one STRING, I’m trying to wear a bow…
-
0
votes1
answer249
viewsSearch the Dynamic Table with a macro
I’m trying to set a button to copy the value of a cell, paste it into one of the children of the dynamic table and give ok. Sub Botão17_Clique() ' ' Botão17_Clique Macro ' ' Range("H3").Select…
-
0
votes2
answers581
viewsCreate a spreadsheet with folder names listed from a directory in excel
I’m using this code to list the folders that contain some names I need to spreadsheet. Option Explicit Sub CreateList() Application.ScreenUpdating = False Workbooks.Add ' create a new workbook for…