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
-
-1
votes1
answer24
viewsCopy from one spreadsheet to another
I am trying to perform this code but excel returns 1004 execution error on line 4 (marked **) could provide me some help on why this happens? Dim i As Integer For i = 0 To 367 Sheets("Plan").Select…
excel-vbaasked 4 years, 3 months ago Carlos Henrique 1 -
-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
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
answer18
viewsProblem in VBA Debugger
Good morning! When I am debugging / debugging lines of code with the "F8" key, depending on the function it enters, instead of going to the next line, the command runs until the end, as if it had…
-
-1
votes1
answer13
viewsExport data to excel spreadsheet by formatting the cell
I am exporting data to Excel, but the format of the created spreadsheet is not what is desired. I am exporting the text 000 however Excel understands as being number, and the exported value is 0.…
excel-vbaasked 3 years, 8 months ago Hernani José de Lima 11 -
-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
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
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…
-
-1
votes1
answer318
viewsUsing Formular1c1
Hi, I’d like to ask you a question. My code is responsible for reading a column, if the value found is different from the previous one, it adds a row, paints a specific color and in the reference…
-
-1
votes1
answer24
viewsOpen PDF File from a Textbox value
Good night, I am a bit stuck trying to optimize my form, the goal is to show the PDF file of equal name corresponding to the value in the Text Box. PDF files are all stored in the same folder…
-
-1
votes2
answers440
viewsVBA reverses day with month in variables of type Date
Context: I have the following code that receives from the user a date: dataAtualDefault = Day(Date) & "/" & Month(Date) & "/" & Year(Date) dataInsercao = Application.InputBox("Data…
-
-1
votes1
answer31
viewsvba data conversion
I have a macro that takes a file inside a folder, converts it from txt with fixed width to csv and saves it in another folder. I get about 400 to 450 files in this format for conversion, the macro…
-
-1
votes1
answer31
viewsBecause VBA returns #value error
Hello I have the following vba code which is a function that takes three parameters and calculates the functions Bult-in trend and rquad and depending on the result it returns trend or the average…
-
-1
votes1
answer27
viewsConcatenate two columns with Excel Vba in six different tabs
I need to concatenate with VBA the texts contained in two columns in Excel spreadsheet, joining them in another column, but performing this procedure for six tabs. The data of columns B and H need…
excel-vbaasked 3 years, 9 months ago Haroldo Passos 1 -
-1
votes1
answer26
viewsCopy table data sequentially with VBA
Good morning! I really need help. I’ve been doing an indicator for meeting minutes. Throughout these meetings the worker writes the minutes in the inclusive excel table problems or improvement…
-
-1
votes1
answer33
viewsSend Emails with VBA attachment
I declared a variable to go from line to line with a repeat loop For to write the emails. Works all neat until you get to the append part of the file, it shows the error image below. I have tried to…
-
-1
votes0
answers22
viewsMacro Copy selection from one Worksheet to another
Hello! I have a macro of a "Control of Forms" button that copies the data of a selection of a Spreadsheet and pastes (Values and Original Formatting) in a selection of another Worksheet, however, if…
-
-1
votes1
answer58
viewsExcel Spreadsheet Macro - VBA - Application definition or object definition error (Completed)
I am creating a macro by Activex Command Button, where it will first select specific cells, each column at a time(AT2:AT15, BI2:BI15, BX2:BX15) and sort them from A to Z. After, in these same cells,…
-
-1
votes0
answers14
viewsColorize a line if a condition is true
Public Sub Worksheet_Change(ByVal Target As Excel.Range) Set range1 = Range("B2:B20") For Each cell In range1 If cell = "Recente" Then With cell.Interior .Pattern = xlSolid .PatternColorIndex =…
excel-vbaasked 3 years, 5 months ago Devinicius 1 -
-2
votes1
answer69
viewsCommunication between spreadsheets
I have a spreadsheet where there are indicators that are updated daily. I would like to somehow send this spreadsheet to a client and when I update some sheet information, on my computer,…
-
-2
votes1
answer52
viewssearch in two worksheets with a form in vba
good afternoon people! my problem and the following: I have a form with 2 textbox one for students' names and another for the classroom and a spreadsheet with two tabs with the same names…
-
-2
votes1
answer132
viewsMake macro with loop by changing the line number
Good afternoon! I urgently need to do a loop macro that does this: Application.CutCopyMode = False Application.CutCopyMode = False Application.CutCopyMode = False Range("BT8").GoalSeek Goal:=0,…
excel-vbaasked 5 years, 6 months ago Paulo Barros 1 -
-2
votes1
answer333
viewsVBA Automation Development - Loop Error Handling
I am developing an automation in VBA that accesses a certain site and takes some information from it, however I’m having a problem in this. The site (Santander - Benner) is very badly done, many…
-
-2
votes1
answer1247
viewsShare workbook with VBA
I need to share a workbook on the network, but when running the code the file goes to the folder C:\Documents\. What would be the solution to this problem? Private Sub btExecuta_Click() Dim…
-
-2
votes2
answers3801
viewsExcel - VBA - Image in the E-mail Body - GMAIL
Excel VBA - EMAIL using GMAIL Good morning, everyone! I need to send an image in the body of the email, at the moment I am using the code below, as I do to include an image at the end of the text? I…
-
-2
votes1
answer46
viewsExcell VBA quickly corrseponde the other in another spreadsheet
need to run a macro depending on the selected cell. all the information is in the same column "E", but when it is for example for E4 I need the selected cell to correspond to another value in…
-
-2
votes1
answer80
viewsHow to format excel cells through excel
I would like to know how I can format the cells of a spreadsheet by C#, already managed to insert the data I would like in it, but I would like to insert formatting and formulas as well. Code: ` int…
-
-2
votes1
answer35
viewsError in excel vba, using . offset, to search for products in a spreadsheet
Hello, I’m trying to learn Excel vba to help my father in his company, I use the version of excel 2016, in the code I built following the course, it was time to enter the product code, it shows the…
-
-2
votes1
answer20
viewsFractional to decimal conversion in VBA
Good morning, I need to run a program that converts a fractional decimal to binary. If I don’t have an exact representation, I must enter a number of significant digits. However, I’m not able to…
-
-3
votes2
answers61
viewsIs there any way similar to the python . format method for VBA in Excel?
In python using the . format for this: users = ['profile1', 'profile2'] print("www.instagram.com/f{users[0]}/") Would soon come out: www.instagram.com/profile1/ Is there any similar method in vba?…
-
-3
votes0
answers22
viewsProblem with IE interaction in Vba, I can’t save
I’m new around here! I’m having a difficulty with save button, on windows screen, I’m doing an IE interaction in vba, enter a particular site, I dowload the file, I click save as, it goes to the…
-
-3
votes2
answers82
viewsDoubts in the combobox
I have two combobox, the first is the managers and the second I have the coordinators. MANAGER - FABIO - ADRIANA - LEANDRO COORDINATORS - TEREZA - GERALDO - GABRIELE - JOICE - VALDIR -ROSE - KATIA…
-
-3
votes1
answer60
viewsFor if it doesn’t work
The code needs to test a two-sentence list. If he finds this phrase, he copies it and pastes it into the cell on the left, until he finds the next sentence. Everything works fine in the first For…