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
-
1
votes1
answer10425
viewsSave an image pasted in Excel spreadsheet through VBA
The code below copies a strip of cells of a spreadsheet that is pasted as image in another spreadsheet, but I did not find a way to save it as an image file in a folder, or even select it to work…
-
1
votes2
answers1416
viewsHow to create objects dynamically based on vector? (VBA/Excel)
I created two Labels dynamically based on a vector according to the code below, however, in the form only remains the last Label created (Newlabel1), both the first (Newlabel0) and the Label I used…
-
1
votes2
answers763
viewsHow to delete dynamically created objects based on vector? (VBA/Excel)
The code below creates Labels dynamically based on an array, occurs that I did not succeed in trying to eliminate (destroy) these objects. I tested 'Nothing' and other features indicated, but none…
-
1
votes1
answer810
viewsWhy do ASCII characters differ from Excel for presentation by code in VBA?
Does anyone know why this occurs? I need to use font characters "Wingdings 3" in Labels dynamically created in a form of VBA. If these Labels are created directly in the form the problem does not…
-
1
votes0
answers57
viewsHow to find the input field ID (Text and Listbox)?
I ran the code below and was able to identify the field ("body_x_tabc_x_identity_x_prxidentity_x_selBscenCode_x_txtselBscenCode_x_x") through the line of the Set objInputs. But I cannot identify the…
-
1
votes1
answer93
viewsUpdate an Access application
What is the easiest way to upgrade an Access desktop application with VBA to a web application with sql server?
-
1
votes2
answers433
viewsHow to locate next values of the same customer
If you could just help me out with this one, and I think you’ll be good for someone else, too. I am trying to make sure that by clicking search the Textbox are filled with customer data, and…
-
1
votes1
answer372
viewsI need help with a Solidworks macro
Basically she has to open the drawing 2d of a selected mount file generate the PDF and close, got something, but only works with the path file, do not know which command to use for it to work with…
-
1
votes1
answer3337
viewsIs it possible to edit Listbox data?
When double-clicking on the line to be edited from the Listbox opens the Userform with the data of the selected line. I cannot get the changes to be modified in Listbox and Spreadsheet. Code when…
-
1
votes4
answers1444
viewsExcel transpose row to column and preserves columns and replicate them in row
Hello, Next, I have a CSV as follows: A;B;C;D;1;2;3;4;5 E;F;G;H;6;7;8;9;10 The columns of letters have a regular structure, whereas the columns of numbers do not but you could blow them up and put…
-
1
votes1
answer774
viewsSpecific Treatment for Groups of Objects inserted in the VBA Toolbox (Excel)
Due to repetitive actions with groups of objects that I create to work as if they were a single object, I grouped some of these objects (right-clicking and selecting group...), and dragged into the…
-
1
votes1
answer193
viewsChange Destination of a File Shortcut with VBA
I am changing the name of several worksheets at the same time, but some of them have shortcuts, and in the middle of the change I want the shortcuts to follow this change. Sub changeTargetPath() Set…
-
1
votes1
answer573
viewsMacro Excel - Save graphic image export to directory and import to form
I updated my Office version for 2016 and some macros stopped working properly. The routine when executed in isolation works properly, but when it enters a process it stops working. The macro in…
-
1
votes2
answers1752
views -
1
votes2
answers3002
viewsHow to assign the formula of cell D2 to a variable?
CODE: Range("AB2").Select Dim tudo As String data_pasta = Format(Date, "/yy/mm/") tudo = "https://pagina.pt/wp-content/imagens" & data_pasta & **D2** ".png" ActiveCell.Value = tudo…
-
1
votes1
answer608
viewsHow can I automatically format equations in Word 2013?
I use Microsoft Word as a text editor (Office 2013 package). I built document with a document with numerous equations making use of the tool Microsoft Equation 3.0. However every time I save the…
-
1
votes1
answer4844
viewsHow to change the icon of the Excel document
I want to change the icon of the excel document, to have another face and look like an executable, or something like that, can help me?
-
1
votes0
answers599
viewsSend Excel macro message to Skype for Bussiness
I have a code that sends messages via lync but the system was migrated to Skype for Bussiness. Could someone help me as I change the code to send. When trying to execute macro it presents the error…
-
1
votes1
answer847
viewsVBA Rename all files starting with "Rel"
Hello I need to generate a code that renames all files in a folder that start with "relat" to "X-CT". The rest of the file name, including extension ". DOC . PDF . XLS" remained unchanged.
vbaasked 7 years, 4 months ago Leonardo Silveira 11 -
1
votes0
answers146
viewsMultiple Intel Control Tables
I need to assemble a control table of many other tables, it is basically a multiple index control that informs the position of these data tables. Editing: after several attempts even using SQL…
-
1
votes2
answers2872
viewsHow to read a single-line txt file in VBA?
I would like to read a txt file through VBA. All the codes I found on the internet loop the file (to get all the lines I suppose), but I wanted to take just the first line more simply and put in a…
vbaasked 7 years, 2 months ago Joao Paulo 11,760 -
1
votes1
answer148
viewsproblem to popular an option type control
I have a VBA code but I’m having problems to the popular one element. When having put data in control appears the following error message: runtime error '2146233079 (80131509)': Unknown error:…
-
1
votes1
answer480
viewsVBA: the underlying connection was closed: unexpected error on a receipt
I have a VBA project that interacts with web pages using the Seleniumwrapper reference. In Windows vista business the application works normally, however, in Windows 7 appears the error reported in…
-
1
votes1
answer679
viewsCopy columns from matching rows
I have a spreadsheet containing 100 rows with country names and 12 columns (months of the year) containing values. My need is to compose a macro that: sweep the columns and copy to another…
-
1
votes1
answer340
viewsSave Chart of a spreadsheet in a folder by VB
Hey there, guys. I’m a beginner in VB programming and I’m with a project, where I access a spreadsheet and insert data into it and this data is shown in graph. How do I save this graphic as an image…
-
1
votes1
answer373
viewsHow to Prevent Access with Disabled Macros?
I have a registration form that shows up as soon as we open the spreadsheet. The registration list (in the Sheets) is invisible and can be accessed only by password by clicking on the "Database"…
-
1
votes1
answer677
viewsHow to set the filters in a Pivotchart through a macro in Excel?
I made a VBA form and wanted to click on a button the filter properties of the dynamic graph associated to a table in Excel if they changed.
-
1
votes1
answer404
viewsRemove duplicate names by VBA approach
Good afternoon! Is there some kind of code to find/remove duplicates by approach? I’m trying to clear a very large base, but the names that were inserted have typos or letters with the same…
-
1
votes1
answer1352
viewsDelete Certmgr certificate by command prompt
I need to delete certain certificates from the computer so that they do not disturb my a vba automation system, however I have not found anything that can give me a light how to do it by programming…
-
1
votes2
answers13773
viewsSQL query in VBA Excel
good morning! First I would like to say that I understand almost nothing of Visual Basic and that all I have learned so far is in the race on forums. So if this is too simple to resolve, forgive me.…
-
1
votes1
answer767
viewshow to make a graph in vba excel in the form of goals?
I need to make a graph where the bars change color depending on their value! example: less than one thousand red, between one thousand and two thousand yellow and above one thousand green follows…
-
1
votes0
answers265
viewsDuplicate record when saving data from a form in vba/useform
Good afternoon friends, How do I duplicate a record in a spreadsheet with data saved from the useform. Being more specific, I will use an example of a health plan where I have a form that registers…
-
1
votes2
answers1488
viewsChronologically order VBA date and time
Good afternoon, I would like to know how I do to sort by date and time by excel. It would be 1 hour column and another date column. Oh my doubt is how I order the schedules chronologically without…
-
1
votes1
answer2146
viewsExport SQL query data to Excel
Good afternoon, everyone. I created a database to control the receipt and delivery of cards. The inclusion of the data is done through a form in excel. This form also has the option of consulting…
-
1
votes1
answer620
viewsVBA how to find the specific name of a spreadsheet and impute data in it
Staff I have a list in plan("Register"). range("H2:H10") I have Data in the plan("Treaty"). range("A2":"Q1862") I want to search the name in the list of plan("Register"). range("H2:H10"), in…
vbaasked 7 years, 7 months ago Anicesio Junior 21 -
1
votes1
answer487
viewsUpdate Frame Selenium VBA
Expensive, How can I update a frame with Selenium in VBA? Updating frame is an option that exists when right-clicking on some frame. I can’t update the whole window, only the frame.…
-
1
votes0
answers442
viewsVBA Configuration of References
Good morning, it may be something really stupid, but I’m starting to work with VBA to search for data on the web and every time I start a new project I have to add the references "Microsoft HTML…
-
1
votes1
answer1517
viewsVBA - Popular array string and do not repeat values
I have an Excel Workbook x. This Workbook has 3 spreadsheets. The 1st is Animals still empty; the 2nd is Birds and we have repeated values and the 3rd is Mammals also with repeated values. How to…
-
1
votes1
answer922
viewsSave query results to an array
good afternoon! I need to get the results of this query: sql = "SELECT controle.ID FROM controle WHERE BP = '" & controlectform.nmbpbox.Value & "';" And save to an array. Later I’ll do a for…
-
1
votes1
answer95
viewsDelete an executable file ( .exe ) after finishing without knowing its location?
The bat file has been converted to executable. The command del "%~f0" does not work! You will need to finish running the executable first taskkill /f "nome_do_executável.exe" and only then eliminate…
-
1
votes1
answer2823
viewsVBA: Putting a space before or after uppercase letters in a given text
I have a string of texts that represent customer names, but which are without the proper spacing between each word/name (for example: Carlosalbertogomes). However the words can be differentiated…
-
1
votes0
answers65
viewsMake clicks for interactive online chart
I need to select the information on the left side of the graph according to my need, but I cannot reference the information. I didn’t put any code because I tried it in various ways (according to…
-
1
votes1
answer1070
viewsVBA: Declare variables online
To declare variables in VBA, I always used the following method: all variables of the same type I put in the same line and declared their type only at the end, as in the example below: Dim…
-
1
votes2
answers792
viewsUSERFORM: I can’t remove items from my Listbox (Error 80004005)
I have a Listbox in a Userform that I "reconstruct" based on a Textbox that I use as a filter. The idea is to bring all items to the list with Rowsource and remove all items that do not contain…
-
1
votes1
answer6730
viewsExcel validation list - runtime error 1004 - Application definition or object definition error
Here’s how it works: I have an array that contains the items for a drop-down list in excel. The code just below creates drop-down lists on cells D5 through D108 on 12 month vector tabs. The expense…
-
1
votes0
answers54
viewsSkin windows media player Adjust window to video size
I’m building a very simple skin for windows media player. How do I get the video to open in its original size? That is, WMP has to capture the size of the video and already open in its size. For…
-
1
votes1
answer1326
viewsExcel - Tables - Identifying the Next Row
good afternoon. This is my first question here. I thank those who can guide me. I made a spreadsheet with some tables (tab "Home page", "Format as table"). Then, I made a VBA to clean this table and…
-
1
votes1
answer249
viewsI cannot access IE checkbox element by vba
I’m trying to click a checkbox by IE, using VBA, but I can’t access the element of this checkbox. I searched through several different forums and the closest I could find was that access to a part…
-
1
votes4
answers6070
viewsExcel VBA - Runtime Error '13': Incompatible Types
I’m getting Error '13' Incompatible Types on the First If Line: Count = 0 For x = 1 To LastRow Step 1 If Cells(x, 8).Value = "Materiais" Or Cells(x, 8).Value = "Imobilizado" Then If Cells(x,…
-
1
votes1
answer266
viewsError at runtime '13'
I am creating a macro to erase the values of the cell that contains #N/D, but it gives me presents (Error at runtime '13') When I put #N/A the code works. Someone can help me solve the problem?…
vbaasked 6 years, 6 months ago John Hebert 151