Category "vba"

Acces to MySQL automatic data transfer

I have to pass data from Access database to a MySQL database attached to HeidiSQL automatically every minutes. To do that i put the data into excel files format

Create a Range Object from Multiple Areas Items

I have a function that aims to return the visible cells (as a range) after applying an autofilter to an inactive worksheet; the autofilter data is represented b

How to specify the max of a field +1 when defining a SetField value in a Before Insert trigger?

I have a database with a table that has as its primary key an autoincrement number field I call id. In the datasheet view, I want to create some new records us

How to specify the max of a field +1 when defining a SetField value in a Before Insert trigger?

I have a database with a table that has as its primary key an autoincrement number field I call id. In the datasheet view, I want to create some new records us

DLookUp select secondary email if primary is empty or null

I have a form that is selecting emails based on companies that have expired insurances. Some companies have both a Business and personal emails whilst others ha

How to loop through the same cell

Private Sub CommandButton1_Click() Range("C10").Select For Range("C10").Value = 0 To 35 Range("C10").Value = Range("C10").Value + 1 Next En

How to capture the MessageID of an email that was just sent in Outlook using VBA

I generate an email in vba and send it. I have a class which includes the send event for that email so I am able to tell if the email has been sent. My issue is

Check if dynamic array is initialized or contains value - VBA Excel

Is there a way to tell if some dynamic array, for example arr() as String is initialized? IsEmpty and IsNothing seems not to work with dynamic arrays. Currently

.SendUsingAccount selection for .onmicrosoft.com custom domain account

I set up a custom domain for my Microsoft 365 business account ("@company.com" is the custom domain which is really "@company.onmicrosoft.com"). I have two othe

if range of cells contains string then goto

I know this is a topic that is talks about a lot, but I just cant find the answer. I have a range. if in that range there is a word then I need it to go to the

Search string syntax for Restrict method

I'm trying to pull a set of five emails from a specified Outlook folder based on two conditions - the (partial) subject line, and received between two specified

How can I reset recurring meeting in vba?

I wrote vba script to duplication my main calendar to another calendar, including recurring meeting. All is well except when the organizer do out-of-order modif

Filter Pivot Table based on clicked cell text

My workbook consists of 2 sheets: Sheet1 is the primary dashboard that the user sees, while Sheet2 consists of a pivot table and regular table. I'd like to imp

Copy data to another spreadsheet based off value stored in string

I have the below code for one of my financial reports and I'm struggling with updating the code to make it more automated. The code creates a string of the colu

How to use Xlwings RunPython for file name with spaces

I am trying to run a python function called comments() from vba and getting an error with the following code due to spaces in the file name: Sub notes() Dim f

Outlook Redemption error in MS Access: ActiveX component can't create object

Code: Dim Application As Object, namespace As Object Set Application = CreateObject("Outlook.Application") Set namespace = Application.GetNamespace

How to reorder Outlook PST mailbox/store in folder pane?

I'm using Outlook 2016 and I have two PST files listed below my default Exchange mailbox/store. In the Folder Pane, I can click and drag the PST mailbox/store a

How to generate multiple json in vertical column in Excel VBA?

Using excel macro The first line is the json file name, and the second and subsequent columns are the values. With the first column as the key to the json obj

Comparing two rows according to specific string

So i've been trying to wrap my head around this for weeks now and have tried many things but nothing that works for my case, I have two sheets with "similar" St

How to write code to test a cell for specific data, and if that data is present, don't run the macro. If not present, then run macro?

I am trying to test a cell for specific data. If it contains that data, I do not want my code to run (because that would leave my worksheet and workbook Unprote