Category "vba"

How can I call a subroutine after an error?

I'm working on user-proofing a VBA app in Excel and I realized I'm constantly rewriting a lot of the same code to create specific error messages that are fed st

I am trying to populate multiple text boxes with one dropdown list

user can select only one key number at a time and I have placed the code on the listbox in the control both under expression, didn't work- then under code build

I am trying to populate multiple text boxes with one dropdown list

user can select only one key number at a time and I have placed the code on the listbox in the control both under expression, didn't work- then under code build

Iterate through rows and columns, compare dates and if statement true sum and print in new column

this is my first question here and i can't find a solution that works for me. I have a set of data. i need to compare the date displayed in cell 2,2 (until 2,10

Count/Sum a column but exclude #N/A

Currently using the following forumlas to count the number of records in all of column Z that does not have #N/A but it does not work. All the rows in Column Z

Excel Chart not updating correctly with VBA

So I have made a macro to export a chart and then import it into a userform as picture. Import/export is working fince, byt the chart is not updating when the d

How to upload whole Excel range of data to SQL server using VBA (without Wizards or looping row by row)?

I am trying to upload a range of data in excel (same structure as target SQL table) to a table in SQL server using VBA. I do not want to loop row by row but tra

How to fill data bellow last filled cell? VBA ComboBox

I have a combo box, and If I choose the first option I want "15" to be written in "A1", and when I enter another data for a second user I want the data to be in

Send and Save specific emails. Not a sentitem event listener

Edit: I am just going to use an eventlistener. I would delete the post but maybe somebody will find a non eventlistener way to save a sent mailitem before it is

VBA - Macro Copied Workbook, Pivot Data Source not Updating, Error with Pivot Cache?

I'm writing a macro that takes a master file, takes a list of sales people, and for each sales person (RSL) creates individual copies of the master file and edi

Copy Pasting Data from a column to a free column, removing empty lines

I was not looking at VBA for a while, and I would really appreciate your help. Private Sub EvaluateButton_Click() Dim r As Long Dim x As Long Worksheets("tests

Export excel data into new workbook

With some of the success of other automations, I am looking to see if it is possible to move rows of data from my excel workbook into a new one based upon the v

Return result on conditional format

Im working on a excel script, that will import a CSV file, analyse the result and create a report based on the analyse. The CSV file contain up to 12 measuremen

What does QueryTable.Refresh BackgroundQuery:=False do?

What does the statement Selection.QueryTable.Refresh BackgroundQuery:=False do in excel macro? Does it disable background refresh for the selected table?

Conditional formatting stops macro from running all the way

I have some conditional formatting together with a module, that for some reason prevents my macros from running all the way through. =NOT(TestColor(E8)) is my c

Faster method to delete a range of rows other that using union

I am using the below code to: Delete the similar rows, keeping only one and combine cells values in the range "N", separated by vbLf it works ,but with big rang

max number of vba bookmarks

I am currently working on a Word-document I want to use as a template. This template provides a "structure" including many bookmakrs. The template is filled usi

How to run code to toggle ShowCursor on Outlook from Excel workbook?

I am using code on Outlook to hide the mouse cursor on Outlook before opening the attached workbook: Private Declare Function ShowCursor Lib "USER32" (ByVal fSh

Filtering multiple fields from a form to open a report

MS Access Database: I have a report that I want to open from a form with multiple filter fields. Each filter works fine when used individually. They do not wo

Automatically download MS Forms Data via VBA

I use a MS Form to collect Data and use an xlsm.file where I copy the new data and then further work with the data. In order to update the data, I have to Open