Most voted "excel-vba" questions
VBA (Visual Basic for Applications) is the programming language of Excel and other Office programs. Use the Excel-Vba Tag when you have scripts problems of a Vbaproject in direct relation to the interface of Excel spreadsheets.
Learn more…335 questions
Sort by count of
-
0
votes1
answer893
viewsSeparate numbers and words
I have a database in excel where in the row/column I have dates and words. Inclusive, with dates before 1900. And in some instances, only the four-digit year. Example: "A1" 20-07-1882 Daniel or "A2"…
-
0
votes1
answer244
viewsHow to catch the monitor serial via code
I need to collect various information from monitors via code, I searched a little and found this link:…
-
0
votes1
answer83
viewsOption "Cancel" Getopenfilename(Multiselect:= True)
i have the following doubt, I want to use the code with the property Multiselect = True which returns a Variant() as a result, however when I click "cancel" it returns False, resulting in the…
-
0
votes0
answers527
viewsHow to login to website with VBA?
Good morning guys. I’m having trouble creating a Macro VBA that login to the site. I’m trying on a test site http://excelevba.com.br/download/login_teste.php. So far I only managed to open the site…
excel-vbaasked 6 years, 4 months ago Mateus Luna 1 -
0
votes1
answer668
viewsHow to add content to the Excel VBA Listbox
Hello, I have a question in a code for Excel VBA. I want the code to search in the spreadsheet the same number that was entered in the TextBox, after finding it sends the information of the entire…
-
0
votes1
answer381
viewsFunction to convert decimal numbers to spellnumber using VBA in Excel
I have a function, =Spellnumber(), that when you put a number there, it drops the number in full. Agr, it drops, in the cents part, and X Cents. I would like her to release with X/100. Does anyone…
-
0
votes1
answer41
viewsCopy Macro between VBA files
Hello, I have a file (I will call WB1) in Excel, with two macros. One of them (macroA) does a data processing and formatting. The other (macroB) creates a new file . xlsm (WB2) and copies some data…
-
0
votes2
answers2132
viewsHow to replace Comma by Point in VBA
How do I replace a comma with a dot using VBA? The following macro does not work: Range("F2").Select Range(Selection, Selection.End(xlDown)).Select Selection.Replace What:=",", Replacement:=".",…
-
0
votes3
answers3521
viewsFailure of RANGE class SELECT method
The intention is that by clicking on the Sintese Euro tab, the macro would impute the "L" character in cell D1 of the Synthesis Local tab and then return to the Euro Synthesis tab. I was able to…
-
0
votes1
answer48
viewsHow to search for phones with Autofilter in VBA
I am using VBA to apply a filter in the phone numbers column. The phone numbers are treated in a personalized way to stay in the model (XX) XXXXX-XXXX or (XX) XXXX-XXXX I take the value of a cell…
-
0
votes0
answers31
viewsCreate charts with data from a different worksheet and varying number of columns
I need to generate a graph for each line of a database. This database varies both in number of columns and number of rows, and is in a different spreadsheet, chanada Matrix 1. Whenever I run my code…
-
0
votes1
answer286
viewsVBA Module that stores data from one cell and moves it to another cell and moves to the bottom cell
Good evening guys, I created a folder with macro where I have two spreadsheets, Query and games. In the spreadsheet games I put name of games and their respective values in real, already in the…
-
0
votes1
answer2000
viewsApplication definition or object definition error
Hello. I am trying to format a table to base a graph, however I am getting the following error message: "run-time error ? 1004': error defined by the application or defined by the object" I am using…
excel-vbaasked 6 years, 3 months ago Marcos Resende 1 -
0
votes1
answer30
viewsI have a code in vba that when running shows error 438
Sub buscacep() Range("B3:D3").ClearContents Set ie = CreateObject("InternetExplorer.application") ie.navigate "https://www.achecep.com.br/" ie.Visible = True Do While ie.busy And ie.readystate…
-
0
votes0
answers15
viewsHow to write slide page in vba
I am creating the slidemaster in vba for a ppt presentation and in one of the text boxes that I am creating I want to write the slide number, but I am unable to find the function that allows me to…
-
0
votes1
answer17
viewsGenerate list in another tab with found data
all right? I am a beginner in excel and need your help to create a spreadsheet that generates a list in another tab based on the found result. When I set a date, I need you to copy the corresponding…
-
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
answer32
viewsVBA to seal cell, complete
Good evening, I am preparing a VBA record sheet and I would like it, when selecting a specific cell, to be filled with an X and delete the other possible alternatives ... If possible, I would like…
-
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
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
answer37
viewsGet web data for VBA string
Good morning! I developed some macros and functions for my use in the company and I would like to validate their use by searching a web page. the page is actually a blogspot. in which I will leave a…
-
0
votes1
answer37
viewsHow do I remove this black box when I press quotes?
Next, I’m learning a little VBA and there’s a business that’s bothering me too much. Every time I start some line with ' or ", the VBA opens this black box: In it I can write the rest of the code,…
-
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
votes2
answers298
viewsVBA - Count filtered column lines and display the value in a cell
Hello friends I am banging my head in a vba code, what I want and when I Filter a column for example "A1" it counts all visible cells, ignore hidden cells and stop counting when find the first empty…
-
0
votes1
answer25
viewsVBA - Error checking cell value
Good morning, I have the following code IF returns "incompatible type" error, anyone know the reason? I’m trying to validate row values with columns. Sub DeleteColumnByHeader() Dim aCell As Range…
-
0
votes0
answers17
viewsProblems with VBA
Good afternoon, I have this problem to run a program created in VBA, I tried to reinstall the MSCOMCTL library, but it didn’t work, someone knows of some related help ?…
-
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
votes0
answers110
viewsCopy Excel Data to Drive
Good morning, need to select data from a file Excel copy, open a file in Google Drive and paste the data. Sub ActualizarDrive() 'Selecionar Ficheiro Windows("Lojas_Pendentes_CCTV.xlsx").Activate…
-
0
votes1
answer41
viewsVba - Function number in full
I need a function in vba that returns a number in full, including the decimal parts until the tenth of a thousandth. Ex: 2,2466 -> 2 integers and two thousand four hundred sixty-six tenths of a…
-
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
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
votes0
answers7
viewsHow to remove a specific item from an array in vba?
In my code I have an array, and when performing a validation (the ranges cannot be greater than 6) I would need to exclude from the array the items that do not meet this validation. If tempos(t)…
-
0
votes0
answers135
viewsConditional formatting between columns in VBA
I need help with conditional formatting. I have a VBA code to compare two columns, one that is in a hidden tab, contains a series of systems that we use in the company and another one contains a…
-
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
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
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
votes3
answers372
viewsHelp with VBA - Excel to TXT
I have a spreadsheet that I use in my store that saves my orders in txt that in another spreadsheet I analyze all the data, but whenever I ask a new request and click to generate the TXT it opens…
excel-vbaasked 5 years, 6 months ago André Willemann 1 -
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
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
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
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…