Category "vba"

Why do we need to use vbObjectError constant when raising user-defined errors in VBA? [duplicate]

Microsoft Visual Basic for Applications 7.1; Version 1088 I created a custom error handler by following online tutorials and I've been us

How to reference server inbox instead of offline inbox?

I want to iterate through my entire Outlook inbox, including messages stored on the MS Exchange Server. However, when I reference my Outlook inbox via: NameSp

Embed picture in outlook mail body excel vba

I am trying to embed a range from a worksheet as an image in outlook mail body. It's saving the picture correctly but I only see blank image in the outlook mail

Excel VBA Chart - Set labels of a graph to red if contains "Parenthesis"?

[update]: Final code used at the end of my question. My problem refers to a graph customization in Microsoft Excel using VBA. I'm trying to customize the label

How Do I Automatically Update the ChromeDriver or EdgeDriver in VBA?

I have searched the web for a solution to "auto-update" my Selenium EdgeDriver automatically. For those who use SeleniumBasic, you know it can be a hassle to ma

How to use Excel VBA "Worksheet_Calculate" function for a range of cells

I want my macro to activate ONLY when a calculated cell in a SPECIFIED range changes. At the moment the macro activates whenever any cell on the sheet is calcul

Setting up password using inputbox to hide/unhide excel sheet

I've recently made a MCQ test module that will help in preparing test papers with random questions from the question bank and conduct test and calculate the mar

How do I resolve Runtime Error -2147219712 (80040600):` The operation failed

The following code snippet works in Windows 10 / Outlook 2013. In Windows 10 / Outlook 2016 I get an error at the .send line: Run-time error -2147219712 (80040

Disable outlook security warning when executing an Excel VBA code

My ultimate goal is to give any piece of information on contacts in Outlook or MS Exchange and get their name and email address without encountering any warning

Excel VBA: Loop and finding multiple values in a range then copying the offset cells in the same range in a categorized list in another worksheet

I am in need of help with looping through a range (In this case Column "C") and finding 5 specific words (Sort, Set, Shine, Standardize, and Sustain) and then o

Office Word vba: How to have different alignments in a word table cell?

I want to write in a word some information via vba. I'm having a problem with the contents of a table I want to import. As you can see my table has 2 columns. T

Search for value in a Range, if found, variable = 1

I'm trying to simplify a project where, actually, the user specify their own values in two fields (string1 and string2). Then, in another sheet, there is a form

VBA: Remove objects from object collection

I want an Access application to autimatically import the right files from a certain folder. My idea to do this, is to get all files in the folder and then proce

Outlook ReportItem.Body returning messed up encoding

If certain users automate the Outlook Client to view bounce backs/ReportItems in a shared inbox, rather than returning the clear text of the message as indicate

Create folder path if does not exist (saving from VBA)

I have a list of items in a sheet like so: My code goes through each row and groups the supplier and copies some information into a work book for each supplier

Outlook attachment names in DASL

I am trying to get a list of attachments in the Outlook table. I have tried below code. It throws an error. Any help is much appreciated as I am new to DASL q

Automating Mail Merge using Excel VBA

I created a macro in Excel where I can mail-merge data from Excel into Word Letter Template and save the individual files in the folder. I have Employee data i

VBA editing cells in protected sheet

I have protected a workbook using vba code. I would also like to let the user entering some values in the specific cells (n4, p7:p10). I have tried by using t

How to search recipients of previously sent mail?

I have a code which checks the subject in my e-mail and warns me if I already sent an email with this subject. I experienced it would be smarter if it checks fo

MSAccess 2010 VBA Open a read-only database

I have a MSAccess database that I'm trying to pull archived data into, from other MSAccess databases that live in read-only folders. So ... Dim aidbx As DAO.Da