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
-
2
votes1
answer66
viewsSaving file automatically VBA
Guys I made this macro to create folders and subfolders automatically, but I need to save the file I’m editing inside the created folder... someone can help me? Follows the script ' MACRO PARA CRIAR…
vbaasked 6 years, 6 months ago John Hebert 151 -
2
votes1
answer2174
viewsattach file and send vba email
Good morning guys, I need some help.. I have this macro she’s working perfectly but I need to add 1 things to it. When she run and generate the new file with the tabs I selected, I need you to open…
vbaasked 6 years, 6 months ago John Hebert 151 -
2
votes0
answers458
viewsAccess database getting heavy after running query via VBA
Next, I have a database Access with a table called tblDados. This table contains 19 initial fields. I import a CSV file que contains 1 million records, so far so good, saved and close the database…
-
2
votes3
answers1380
viewsExcel (VBA) - Copy data from files
I’m trying to gather data from multiple files into a single spreadsheet. In some researches I did through the network, I found several suggestions, and below this the code I found and met the need.…
-
2
votes1
answer569
viewsProblems to close another spreadsheet by VBA
I am running the code below to compare data from different spreadsheets. It is running correctly, but I am not able to close the source sheets of the data. I have tried with '.Close', '.Quit' and '=…
-
2
votes0
answers93
viewsImprovement in my code (basic) to import files in Excell VBA
Good night. To the experts in vba, I have been working in several spreadsheets with this code logic, to import files, and after that, work on their numbers with either macro or formulas. I would…
vbaasked 6 years, 4 months ago William Cezar 21 -
2
votes0
answers131
viewsZip code research
I am developing a solution and the need to add the CEP research has arisen. Return would like to get the address based on the CEP informed. I started writing the code below but stopped at it. Sub…
-
2
votes1
answer1393
viewsReturning value via VBA
I created a database in Excel that should accept only 1 CPF. So I created the following function that checks and prevents repeated entries from being entered. Function verifica_cpf(cpf As Integer)…
-
2
votes1
answer1307
viewsVBA, create a macro so that I can compare two lists of names?
I’m having trouble creating a macro that can check the equality between each cell of a list and, if both are different, leave a blank line above the cell. For example: TO THE B C C D D AND AND F G H…
-
2
votes1
answer76
viewsVBA- Add entire row in a Listbox
I’m trying to add an entire line to a listbox, based on the result of a search .Find, the idea is to find the value that matches the searched term it adds each line that contains this value in the…
-
2
votes1
answer566
viewsPosition userform on the same monitor excel is on
Good afternoon, I am creating a Dashboard in which when running Excel a userform is opened, maximized and Excel is hidden. My code works perfectly for a PC with only one monitor. When using a PC…
-
2
votes0
answers282
viewsInsert an image in the Excel spreadsheet with VBA but without the link to the original image
I am creating a table generator in Excel and need to insert several images that are in a certain folder. I make this insertion by the following code: altura = 3 On Error Resume Next For L = 1 To…
-
2
votes0
answers67
viewssite authentication VBA
I’m scraping a site and I’m putting the cookie authentication, has to be by Mozilla. I am provisionally using Cookie authentication .setRequestHeader "Cookie", "JSESSIONID=... I created this sub…
vbaasked 4 years, 9 months ago Lindi Ribeiro 31 -
2
votes1
answer137
viewsHow can I decrease the running time in my application in VBA
Hello, I am developing an application in VBA that is responsible for searching in an excel spreadsheet 2 data in different columns: the serial number, and the beginning of manufacturing. Then, I…
-
2
votes1
answer64
viewsVBA - Use one column values to mount table
Good morning, I’m extracting a database with dates and number of occurrences. But for my statistical model I need to organize it in a way that only the dates appear multiplied by the number of…
-
2
votes1
answer110
viewsACCESS VBA - Consultations with several periods
Good afternoon! I’m creating a chart query form. Inside the form I have some comboboxes store a string in a variable and when the client clicks to filter this string is inserted inside the "WHERE"…
-
2
votes0
answers20
viewsScritp VBA Identify Data Entry
Good afternoon, I have the code below in VBA that returns me the USB ports in use. However I need to know which one is sending me the data from the bar code reader, because I will use 8 readers in a…
-
1
votes2
answers1412
viewsHow to turn a DLL created in C# to VB6?
I created a very basic DLL in C# just for testing. It looked like this: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using…
-
1
votes1
answer300
viewsParameterize trip count in a select VBA routine
I would like to get the following select, for so I will provide the example below, remembering that I use the VBA of Access 2007. Goal: Count the journeys made by the fleet vehicles by Line /…
-
1
votes1
answer437
viewsConsolidation of tables in Msaccess and VBA
I have the following access database: mov_atm n_mov conta data valor mov_sc 100 200 1/8/2014 500 n_mov conta data valor 101 900 5/8/2014 800 200 900 5/8/2014 800 102 100 1/8/2014 500 109 100…
-
1
votes0
answers71
viewsHow to view queries that returned error?
Hello, I wonder if in mysql, in his own dictionary (Mysql) I can debug the query that returns with an error of a particular application?
-
1
votes1
answer702
viewsVBA DELETE command does not work
I have a project that adds and eliminates dates, to add I have the following code: Set dbs = CurrentDb dbs.Execute " INSERT INTO TMP " _ & "(diaMes) VALUES( " _ & "'" & tmp7 & "') "…
-
1
votes1
answer57
viewsConvert currency formats EUR->USA and USA->EUR in Excel
My problem: Convert a Range Excel with currency format (USD) to (EUR) and vice versa. Format USD 123,456,789.00 Format EUR 123 456 789,00 I tried to encode a replacement in VBA but I am a beginner…
-
1
votes1
answer527
viewsManual filter via VBA with last available values
I need to filter, via VBA, the 30 last values available in a dynamic table but in the "manual filter" that is the line... It is possible to read, in VB, the values available in the "manual filter"?…
-
1
votes0
answers1518
viewsVBA code to get values inside HTML
I want to collect two values of an HTML through VBA. The information '40 New' and '$19.95'. My code can get '$19.95', but in the next iteration it overwrites and gets '$17.38'. `Set QuestionList =…
-
1
votes0
answers626
viewsWhat to do to decrease the processing of Memoria RAM in VBA?
I am making a spreadsheet, and whenever I run my macros it starts to crash, I saw how much of Ram ta using and ta 1.6GB and the file each time it saves increases significantly in size, now it is…
-
1
votes0
answers92
viewsSave data in excel file through Outlook
I created a Rule, that every time an email arrives with a certain text on Subject executes a scrip, which has the function of going through the entire email and storing certain data in an Excel…
-
1
votes1
answer1565
viewsSelect a row of the listbox object
I have a spreadsheet (Plan1), with its cells listed in a listbox1, would like to capture a line with several information cells and list it in a userform, how should I do?…
vbaasked 9 years, 5 months ago Daniel Benjamin Alves 11 -
1
votes1
answer220
viewsMultiple Access instances
As it opens multiple instances of the same Access Bank, I saw that a former co-worker used the command: Shell "MSACCESS.EXE " & Chr(34) & CurrentDb.Name & Chr(34) But when executing me…
-
1
votes2
answers1236
viewsVBA for directory search and concatenating filenames
I need to evolve the following code to do the concatenation of data in a certain way. I have a folder with photos of products, (several photos for each product) and I want Excel to do a search by…
-
1
votes1
answer989
viewsProblem with VBA and Internet Explorer integration
I am trying to use VBA to collect data directly from the internet. I saw several examples of the use of the Internetexplorer Object, as below: Dim IE as Object Set IE = New InternetExplorer…
-
1
votes2
answers1065
viewsVBA Control of hours/employees
I’ve been trying for days to learn the commands in VBA to automate a company’s employee hours control spreadsheet. I have a sheet with the names of the employees and a calendar as follows: horas…
-
1
votes3
answers11806
viewsCopy from a filtered sheet in excel vba
I’m having a problem, I need to extract a list of excel data that I Filtreed with over 200,000 lines, i have the option to make excel analyze each line and delete it but I wanted to do this without…
-
1
votes1
answer5403
viewsMacro to exclude filtered table row
I created a table with data from an account balance and I am doing a macro to select only a few values. An assignment of the macro would be to filter in one of the columns all zeroed values so as to…
-
1
votes1
answer697
viewsMacro in Outlook 2010 Ontime()
Eae guys, I need to do a macro in MS Outlook that only run in a certain time range, there is some function that helps me with this?? I saw that in Excel there is Ontime(), but it seems that in…
-
1
votes1
answer4042
viewsMacro execution is stopped repeatedly - How to avoid?
When I am running a VBA macro, eventually the code is stopped, as if there were breakpoints. The message displayed is: Execution of code interrupted. If you accept the message and continue executing…
-
1
votes1
answer920
viewsAdd cascading data from a column in Access
Hello! I need to make a query that returns the weekly balance of certain products in stock. For example: Ano/Semana | Saíram | Entraram | Saldo ______________________________________ 2015/01 | 4 |…
-
1
votes0
answers2077
views -
1
votes1
answer10265
viewsMacro to copy from a spreadsheet and paste only into cells visible from another
I need to copy the "L" column of the sheet "DIVISAO" to the filtered cells of the "L" column of the sheet "DPTO". That is, I need a macro that looks for the information in a spreadsheet and sticks…
-
1
votes1
answer1011
viewsProblem importing text file via VBA
I am trying to import a text file to excel through the following macro: Sub Teste() Dim intervalo As String intervalo = "intervalo" Workbooks.Add ActiveWorkbook.Sheets("Plan1").Select With…
-
1
votes1
answer2459
viewsVBA - excel does not recognize comma of external data
Good morning to all! I am trying to integrate excel to other software (the EES - Engineering Equation Solver) through a code in vba. My program copies certain columns of a table, transfers to the…
-
1
votes2
answers71
viewsDo not modify cell for a given result.( History)
In a management table I have two columns a Status(Coluna A) and another Estado Anterior status. In this I want to keep the same value as in column A, except for some case. So that it keeps a status…
-
1
votes1
answer182
viewsHow to copy multiple excel files in an access 2010 database using vba
am new in VBA programming. I need a vba code in excel that copies several excel files to an access table.
-
1
votes0
answers113
viewsConnecting Powerpoint to Access through VBA?
I’m creating a kind of "urn" Power Point would like to 3 (three) basic solutions for calculating votes; When you click the confirm button, the vote is automatically sent by e-mail, to a particular…
-
1
votes0
answers130
viewsUse macros to create toner notifications
I have a spreadsheet, in which I am implementing a script, which will monitor the toner level of each printer. each printer I can access via the web via an IP. With this script I will be able to…
vbaasked 9 years, 2 months ago Eustaquio Sena 11 -
1
votes1
answer63
viewsHow to merge several Excel tables into one?
I have 3000 tables like in this example: I need to merge them into one and I’m using the remote: =ÍNDICE(TXT!$B$1:$B$200,CORRESP(MAIOR(SE(TXT!$A$1:$A$200="Last…
-
1
votes1
answer3806
viewsHow to generate Forms without title bar in VBA/Excel?
I need to work with some forms without the title bar in VBA/Excel. I found many similar solutions, but all for 32 bits (mainly in old versions of VBA). The indications they gave to adapt to 64 bits…
-
1
votes0
answers499
viewsHow to list download links by VBA
Hello! My problem is this... I am doing the access to a site, where I provide login and password and travel through the pages to my page of interest. I have a feature that always lists all links on…
-
1
votes0
answers101
viewsHelp with logic - Check if the order was made too far in advance
I’m developing a script in vba, in the Outlook, so that it saves all attachments that arrive with the new emails, with extension xlsx. It checks if it is the right attachment (through a code that…
-
1
votes0
answers140
viewsLaunch PDF files in VB6
I have a directory on the server that is created according to the book and sheet, where when scanning images it is saved through the book and physical sheets. example: I have a book that I have…