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
votes0
answers205
viewsCopy multiple sheets into a single file
Good afternoon, I made a code to capture a Sheets of a given spreadsheet, however now I want to take more than one and save all in a single file, but I’m not getting anyone could help me? Private…
-
0
votes1
answer443
viewsDelete whitespace from Activex Excel combo box
I have a default list with values and another list of "Organization" when I delete values from the default list to another organization list, organize values. The problem is that I added a combo box…
-
0
votes1
answer125
viewsSPRING object for monthly changes
Good morning, I need to know if there is any SPRING object in vba for the monthly changes screen because I need to validate when a missing is launched.
-
0
votes1
answer813
viewsLike Dar Saveas on I.E
I’m having a problem downloading a file via vba, because when I can open the document (pdf format) I can save it with name and location quietly, but when it does not open in the browser itself, ie…
-
0
votes0
answers1608
viewsImport access data to excel based on criteria
I have a table in access and I can already pull the data from it to an excel spreadsheet (I can do this using the code below), but I would like to be able to pull only some data (based on criteria,…
-
0
votes1
answer919
viewsDate handling problem in an ACCESS/VBA application with SQL Server database
I needed to migrate the database of an application made in vba using access. The database was native to access and passed to SQL Server. In access, as everything is native everything worked…
-
0
votes1
answer347
viewsError at runtime. Failure in attempted VBA Outlook operation
I created a macro to run a routine in outlook. The code works perfectly on a PC, but when I replicate the code to another macro I get the following message: Runtime error '-2147221233(8004010f)…
-
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
answer60
viewsHow to replicate a value depending on what is inside the cell?
I have a code that always puts 264 empty characters after the last word typed inside the cell; then puts more "00000000000000" after 264 empty characters and export to txt, as shown below: My…
-
0
votes3
answers2568
viewsGoto Error Handling Does Not Work in Loop
I have an application running in VBA, in it I have an error treatment that works perfectly the first time the action goes through it, but it is inside a For Each loop and the second time it simply…
-
0
votes1
answer123
viewsIt would be possible to create a string that has more than 256 characters in VBA
Can a variable of type string and need to save around 1k of words to send as parameter to a database, I would like to know how to do this. Actualemente meets thus my variable: Dim variavel As String…
-
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
answers227
viewsGenerate Vbscript log
I have the following code. ' Ajuste o número de psts a serem feitos backup. *Obs.: comece por 0* ' ReDim pst(0) ' Defina o local referente a cada arquivo a ser feito backup ' pst(0) =…
-
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
votes1
answer23
viewsMacro and VBA that deletes the oldest records, if they are the same value
Talk, guys, I’m new here and I’m desperate for some help. I need you to delete the oldest records from a list of multiple trips, keeping only the latest of them. The print below makes it clearer. In…
-
0
votes1
answer175
viewsActivate found cell
I’m having trouble activating the cell that was found. The code is as follows:: Private Sub cmdPesquisar_Click() 'Verificar se foi digitado um nome na primeira caixa de texto If Txtnif.Text = ""…
-
0
votes1
answer200
viewsVBA Error when displaying data from a Worksheet
I’m experimenting VBA and managed to add data to a BD in sheet 2. And now I tried to do to show the data on sheet 1 where I choose the ID and it shows the data entered there, but it’s giving me a…
-
0
votes1
answer1114
viewsRuntime error: 9 - subscribed out of range 2
hi! i am having problems with this error. credit that is some problem in the data I entered, but I can not fix. Calcul des cumuls annuels sur l'année hydrologique (1er septembre au 31 aout) For k =…
-
0
votes0
answers10
viewsConsume Microsoft Graph in VBA
I am a developer in VBA, and now I need to use the resources of Azure. I’m in need of help adding to my spreadsheet in App Logs Which option I choose here and what I fill in the other label? After…
-
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
votes3
answers60
viewsVba - Graphic + Show Detail
Good Afternoon! Can anyone help with that code. I am trying to record a macro that when I click on the graph data series, it opens the cases in a new tab (How does show detail) When saving the code…
-
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
answer494
viewscalendar returns date mm/dd/yyyy instead of dd/mm/yyyy
I am using a calendar that, regardless of the changes I make, always returns the date mm/dd/yyy when it is intended to be dd/mm/yyyy. The code below is not mine, was removed from the net: Option…
vbaasked 6 years, 9 months ago Júlio Faria 55 -
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
votes0
answers12
viewsHow to select the lowest value in a given vba range?
Good afternoon, I am having a problem in a part of the code in which I need to select the lowest value of a given range. I need to select because I will have to use offset to find out the value…
-
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
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
votes2
answers1094
viewsHow to handle IE objects that do not contain an ID? VBA Access
Good afternoon, I am not able to manipulate (inmputar value) objects (textbox) of an IE page, because these objects do not have ID. Follow the code I’m using Dim IE As InternetExplorer Dim Ulogin As…
vbaasked 6 years, 8 months ago gabrielpn06 1 -
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
votes1
answer44
viewsHow to ignore capital letters in a comparison structure
I am trying to make a comparison in a spreadsheet and manage to define the range and tbm the conditional formula, but I am incurring a basic error that are the uppercase letters... for cells that…
vbaasked 3 years, 9 months ago Carlos Borges 9 -
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
answer25
viewsHow to bring file information into a folder
Hello I have to do a qualitative analysis of images that are on my site, I have all the files in a folder and I need to bring two information to Excel: File name and its dimensions.…
-
0
votes1
answer32
viewsHow to reference properties of a userForm to a sub in excel?
I created a form in vba (excel) and in this form contains a checkbox, I would like to trigger a given command if the checkbox is marked, however the code to be triggered is in a module sub separate…
-
0
votes0
answers132
viewsPRODUCT REQUEST in Excel with Product Photos, via VBA
I am developing a PRODUCT ORDER in Excel, via VBA. In this order, in addition to the description of the Product - item by item, I have the sizes of the same (I have already done); However I am not…
vbaasked 6 years, 6 months ago Jocemar Szczepkowski 1 -
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
answer18
viewsShow some columns in Listbox
I am building a system for my company, where when I click on a button it is bringing me all the columns of the table, but I would like to specify which columns I want to display. Since these columns…
-
0
votes1
answer50
viewsUpdate Data Power Query and Copy Values by VBA
I need to update some cells in my spreadsheet as soon as an update in the Power Query table is done, but cells only update the second time I run the code. Sub AtualizarDadosPowerQuery()…
-
0
votes0
answers27
viewsHow to troubleshoot incompatible types error in vba?
I am trying to go through a list of filtered results in VBA and found the following syntax, however when running appears "Incompatible types" loc13 = Workbooks("Histórico…
-
0
votes0
answers11
viewsRead all VBA populated rows
Good morning, I need to read the number of filled lines to perform a for, but some lines are blank and the function for when to find the blank line col = Worksheets(1).Range("C4").End(xlDown).Row…
-
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
answers37
viewsDoubt about Excel textbox control
You guys, good night! Reason for my coming here: I have a Textbox control in an Excel Form (VBA). This form is configured to accept line breaks with ENTER and multiline. However, when sending this…
-
0
votes1
answer95
viewsYear/Month/Day... how to do
but I need him to manage me a portfolio of year, month and day Can someone help me? follow... ' informacoes Public cDay, cMonth, cMonthName, cPath Function identificarData() ' Identificar o caminho…
vbaasked 6 years, 5 months ago John Hebert 151 -
0
votes1
answer213
viewsMacro in Word to format Whatsapp conversations
Hello, I’m doing a macro to edit Whatsapp conversations. When you access Whatsapp, open a conversation, tap the three points in the upper right corner, tap "More", and then tap "Send by email", the…
-
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
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
viewsReset Page every click
Have in the figure above this small Userform with three pages. On the first page, when clicking the Enable button, the next date is inserted with Textbox Data as False, so that the user does not…
-
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…